A medium-sized earthquake damaged buildings and sent residents fleeing from their homes in northern Thailand early Wednesday, officials and residents said. There were no reports of injuries.

The quake, with a magnitude of 5.1, struck at 12:02 a.m. in Mae Rim district, just outside the city of Chiang Mai, the national meteorological center said in a statement.

Chiang Mai, about 350 miles north of Bangkok, is one of Thailand's most popular tourist destinations.

FOXNews.com's Natural Disaster Center

The quake damaged at least five dormitory buildings at Maejo University, about 6 miles from Mae Rim, and sent panicked students and faculty into the streets, said Pitak Rajakan, a professor.

"I was so frightened, it felt like a herd of elephants stomping through my house," Pitak said.

More than 2,000 students were temporarily evacuated from their dorms.

Visit FOXNews.com's Natural Disaster Center for complete coverage.