The quake was felt the strongest in the border city of Mexicali. No major damage or injuries have been reported.
Some schools and public buildings were evacuated after the quake early Thursday as a precaution.
The U.S. Geological Survey says the quake was centered 20 miles southeast of Mexicali and 100 miles east of Tijuana.
There were smaller quakes in this area on Wednesday, the first hitting at about 4:20 p.m. of a 3.7 magnitude.
The Associated Press contributed to this story.
- Get more L.A. breaking news, weather, traffic and sports
- Have a news tip? Send your tips, video, or pictures