ILLAPEL, Chile: Thousands of residents of this small city in northern Chile were sleeping outside after a powerful earthquake destroyed their homes on Thursday.

The tremor also forced more than 1 million to evacuate and killed eight people in the quake-prone nation. Several coastal towns were flooded from small tsunami waves set off by the late Wednesday quake, which shook the Earth so strongly that rumbles were felt across South America.

The magnitude-8.3 quake that hit off northern Chile on Wednesday night lasted for three minutes, causing buildings to sway in the capital, Santiago, and prompting authorities to issue a tsunami warning for the Andean nation’s entire Pacific coast. People sought safety in the streets of inland cities, while others along the shore took to their cars to race to higher ground.

“I thought it was the end of the world and we were going to die,” said teary-eyed Manuel Moya, 38, sleeping with his wife on the ground outside their destroyed home in Illapel, 175 miles (280 kilometers) north of Santiago and 34 miles (55 kilometers) east of the quake’s epicenter. The town and surrounding areas have about 35,000 residents.

Moya said he and his wife were in bed and watching television when the quake hit. Fearing they would be killed if they remained inside, they ran outside in their underwear. By the end of the shaking, their home, made of concrete, had been reduced to rubble.

“They said it was a magnitude 8 but it felt like a 10,” said Moya, adding that neighbors had brought them clothes.

Speaking to the nation late Wednesday, President Michelle Bachelet urged people who had been evacuated to stay on high ground until authorities could fully evaluate the situation. Officials said schools would be closed in most of the country Thursday.

In the past year, the nation of 17 million has endured devastating floods in the north, wildfires in the south and two volcano eruptions.

“Once again we must confront a powerful blow from nature,” said Bachelet.