Chile's government promised to deliver hundreds of portable houses Thursday for people left homeless by a powerful earthquake that hammered the country's north, killing at least two people and injuring more than 150.

The 7.7 magnitude quake, centered near the desert village of Quillagua in the foothills of the Andes, was so strong it shook the capital Santiago, 780 miles away, and was felt on the other side of the continent in Sao Paulo, Brazil — 1,400 miles to the east.

• Click here to view photos.

It damaged thousands of houses, blocked roads, crushed cars and knocked out power across northern Chile.

"It was incredible. I thought my last day had come when I saw the mountain shaking under a large cloud of dust," said Maria Ines Palete, a resident of Quillagua.

The quake, which struck around midday Wednesday, was followed by several aftershocks, including three larger than magnitude 5, according to the U.S. Geological Survey.

President Michelle Bachelet was expected to fly to northern Chile on Thursday.

Hardest hit were the towns of Maria Elena and Tocopilla.

Two women were killed in Tocopilla, 25 miles from the epicenter, when their houses collapsed, authorities said. Hospital director Juan Urrutia said at least 117 people were treated there for injuries or panic.

About 100 houses were destroyed and another 2,500, or 40 percent of the city's total, were damaged, said presidential spokesman Ricardo Lagos Weber. Two sections of Tocopilla were evacuated and schools were being used as shelters for those left homeless by the quake.

Dr. Cristian Castillo told the Associated Press that "80 percent of our hospital is useless," and patients evacuated.

Chile's government said it was flying 500 emergency housing units to Tocopilla, along with a military hospital, medicine and food. The housing was expected to be installed Thursday morning.

Lagos Weber said about 170 people were taken to hospitals across the region, but that many of the injuries were not serious.

Early Thursday, electricity was restored in large areas of Tocopilla.

Officials said some people refused to go shelters fearing their homes would be looted if left unguarded, and a number slept in their cars or in front of their damaged houses.

In Maria Elena, 1,200 homes were damaged — or 70 percent of the city's total, Lagos Weber said. Residents were still without running water, electricity and telephone service late Wednesday.

"I was at work and came home after the quake to find that I no longer have a house," said Julio Lopez, a Maria Elena resident.

At the badly damaged Lautaro restaurant in Maria Elena, a dozen men drank beer by candlelight.

"What else can I do? I lost everything. So I'll just have a few drinks," said Samuel Araya, a 57-year-old miner in this town of 7,000 people, which was once a nitrate mining center.

Blanca Pizarro said she took refuge under her kitchen table when the quake struck and seconds later the roof collapsed on the table. "I'm alive by a miracle," she said.

Emergency bureau director Carmen Fernandez said 16 blocked roads were being cleared late Wednesday and power had been restored to about 85 percent of the region.

Chile's largest copper mines are in the quake area and production was halted as electric power was cut for several hours. But Codelco, which operates some of the largest mines, said the situation was back to normal by the end of the day. Chile is the world's largest copper producer.

About 10 road workers were trapped near Tocopilla when a section of a tunnel they were repairing collapsed, but all were in good condition and rescuers were working to free them, according to the government's emergency bureau.

In the port city of Antofagasta, 105 miles south of the epicenter, police Capt. Javier Carmona said at least 45 people were injured.

Scientists were trying to determine why the quake apparently caused so little damage.

"The ground in the region is very good, very firm, so the movement's effect on buildings is limited," said Sergio Barrientos, a seismologist at the University of Chile.

"It comes down to the level of shaking in certain places," said Paul Earle at the USGS. "It's not immensely populated in the areas most affected."

The quake occurred in one of the most seismically active regions in the world, where the Nazca tectonic plate is shoving itself beneath the South American plate.

A 1939 quake in Chile killed 28,000 people and in 1960, a magnitude-9.5 quake — the strongest recorded in the 20th century — killed 5,700 people. On June 13, 2005, a magnitude-7.8 quake near Tarapaca in northern Chile killed 11 people and left thousands homeless.