Peacekeepers attacked rebels in eastern Congo with helicopter gunships Monday while crowds of protesters threw rocks outside four U.N. compounds, venting outrage at what they claimed was a failure to protect them from advancing rebel forces.

U.N. spokeswoman Sylvie van den Wildenberg said the peacekeepers fired Monday at rebel forces surging on Kibumba, about 28 miles north of the provincial capital of Goma.

In December, U.N. officials also used helicopters to repel the rebels, killing hundreds under their mandate to protect civilians in the vast Central African country that has been ravaged by years of dictatorship and civil war.

Click here for photos.

Rebel leader Gen. Laurent Nkunda has threatened to take Goma in defiance of calls from the U.N. Security Council for him to respect a U.N.-brokered January cease-fire.

In an interview with The Associated Press, rebel spokesman Bertrand Bisimwa claimed Monday that fighters were within seven miles of Goma. Residents of Katindo, a neighborhood three miles from downtown Goma told The Associated Press they heard bombs exploding late Monday afternoon.

Tens of thousands of civilians have abandoned their homes. Women and children lay down on roadsides made muddy by tropical downpours, stretching out to spend the night. Some had mats or plastic sheets; others simply dropped, exhausted, to the earth.

Also Monday, the U.N. spokeswoman said that the commander of the embattled Congo peacekeeping force had resigned.

People in eastern Congo are furious that the U.N. peacekeeping mission — the biggest in the world with 17,000 troops — has been unable to protect them from a rebel force that says it is fighting to protect ethnic Tutsis. Residents opposed to rebels, including Hutus and those who lived in camps after fleeing earlier conflicts, feel particularly threatened.

The crowds shattered windows and damaged cars at the main U.N. office, van den Wildenberg said. One witness said he saw a peacekeeper fire into the crowd at one compound and injure a man, but it was not immediately possible to confirm the report.

Meanwhile, hundreds of soldiers pulled back from the front just 25 miles north of the city in tanks, jeeps, trucks and on foot in what appeared to be a major retreat. Soldiers honked their horns angrily as they struggled to push through throngs of displaced people poured onto the main road.

The civilians and soldiers pushed south from a major army base seized by the rebels and surged toward the provincial capital of Goma.

As the crowds surged within reach of the city, soldiers blocked access to the northern entrance of Goma, apparently fearing that rebels could be trying to infiltrate with the displaced civilians.

Inside Goma, terrified and angry civilians converged on U.N. offices, all of which are located within the compact city. One witness, Emmanuel Kihombo, said a peacekeeper fired directly into the crowd at one compound and shot a man in the stomach.

Kihombo, who is unemployed, said the protesters also hurled stones at about 20 Tutsi students, but that they all managed to run away.

It was an indication of dangerously building anti-Tutsi sentiment fueled by the success of Nkunda's rebels, who say they are fighting to protect minority Tutsis from a Rwandan Hutu militia that escaped to Congo after helping to perpetrate the 1994 Rwandan genocide. Half a million Tutsis were slaughtered.

Congo's government has accused the Tutsi-led government that won power in Rwanda after the genocide of sending troops to support Nkunda — a charge Rwanda denies and the U.N. says is unfounded.

U.N. officials said Nkunda's fighters on Sunday blatantly launched several rockets at two U.N. armored cars. A spokesman for Nkunda denied responsibility for the attack that injured several U.N. soldiers and damaged the cars.

Van den Wildenberg, the U.N. spokeswoman, said there was no doubt the attack came from Nkunda's rebels. She said the peacekeepers were trying to get to thousands of people still trapped behind the front line around Rumangabo, the strategic army camp north of Goma.

Nkunda's rebels overran the camp early Sunday and retained it — despite soldiers pounding the area with heavy artillery from tanks and smaller armed vehicles.

The rebels also have seized the headquarters of Virunga National Park, home to 200 of the world's 700 mountain gorillas, which are considered critically endangered. Park director Emmanuel de Merode said Sunday's seizure of the headquarters was "unprecedented, even in all the years of conflict."

The ragtag Congolese army, cobbled together of defeated army troops and several rebel and militia groups after back-to-back wars from 1997-2003, is disjointed, undisciplined, demoralized and poorly paid with lowest-ranking troopers getting little more than $20 a month.

Nkunda is believed to command about 5,500 highly trained and disciplined fighters.

Congo has been ravaged by years of dictatorship and civil war that have kept people from profiting from vast reserves of diamonds, gold and other resources. Congo held its first democratic elections in more than four decades in 2006. But the new government has struggled to assert its control of the sprawling country, which is the size of Western Europe, particularly in the east.