KIGALI, Rwanda — Two earthquakes struck hours apart in Rwanda and neighboring Congo on Sunday, killing at least 39 people and injuring hundreds of others, officials said. Some of the victims died when the church they were attending collapsed.

The first, 6.0-magnitude quake struck Congo early Sunday, according to the U.S. Geological Survey. The second quake, which registered 5.0, hit a few hours later near the countries' border, in Rwanda's rural Rusizi district.

Thirty-four people were killed and 231 wounded in Rwanda, according to a Ministry of Health hot line. Frank Mugambage, an official in the president's office, said some of the victims died when a church collapsed. Rescuers were searching for more victims, he said.

Across the border in the lakeside city of Bukavu, Mayor Raisi Kunda said five people were killed and 149 wounded there. Kunda said many homes, as well as schools and churches, were damaged in the city but the extent was not immediately clear.

The area where the quakes hit is part of Africa's Great Rift Valley, which includes a seismically active fault line. The Rwanda temblor rattled the capital, Kigali, some 125 miles away.