Thousands fled their homes in Somalia's capital Monday after at least 35 were killed over the weekend in some of the worst fighting in weeks, while masked Islamic fighters were seen heading toward Mogadishu.

An Associated Press reporter saw people fleeing in taxis, pickups and trucks stacked with suitcases, mattresses, furniture and other belongings. Residents in northern Mogadishu reported sporadic fighting but there were no immediate reports of casualties Monday.

"Some of them do not know where to go. They need urgent help," said Ali Sheik Yasin Fadhaa, the vice chairman of the Elman Human Rights Organization. He said staff throughout Mogadishu had counted 5,200 people fleeing Monday. A total of 17,200 people have fled the capital since Saturday, Fadhaa said.

Asha Yakob said she was fleeing her northern Mogadishu neighborhood of Fagah with her children for a safer part of the capital.

"I have no other option," Yakob, told The Associated Press as she balanced some of her belongings on her head — sheets, other bedding and clothes wrapped in a ball.

"Those who are fighting seem to be foreigners. If they were Somalis, they would never kill innocent and poor people like me. They are enemies," said the 41-year-old mother, crying.

The renewed violence in the Horn of Africa nation is pitting pro-government fighters against those allied to al-Shabab, an insurgent group seeking to overthrow Somalia's Western-backed government and establish an Islamic state. Over the weekend, both sides pounded the capital with mortars and machine-gunfire.

The insurgents have been trying to topple the weak government since late 2006 and the lawlessness also has allowed piracy to explode off Somalia's coast.

President Sheik Sharif Sheik Ahmed told journalists Monday that the people behind the weekend fighting are against peace, but he is willing to talk with his opponents.

"Anyone opposed to the government should come to the negotiating table. Fighting is not a solution. As a government we are ready to reach agreement with every opposition group," Ahmed said.

The U.S. worries that Somalia could be a terrorist breeding ground, particularly since Usama bin Laden declared his support for al-Shabab. The U.S. also accuses al-Shabab of harboring the Al Qaeda-linked terrorists who allegedly blew up the U.S. embassies in Kenya and Tanzania in 1998.

Ali Osman, who runs a small kiosk along a road leading from key southern Somali towns to Mogadishu, said he saw masked fighters heading to the capital in pickups Monday. Some had wrapped a black flag around their heads with the Arabic inscription "There is only one God, Allah" — which he said was a sign they are al-Shabab fighters.

The group may have called for reinforcements from its strongholds south of Mogadishu.

Al-Shabab controls much of southern Somalia. Ahmed's government directly controls only a few blocks of Mogadishu and one border town. But the president has allies among the militias that control much of central Somalia and pockets of the south.

Ahmed, elected by parliament in January, used to be one of the leaders of the Islamic insurgency. Since his election he has been trying to broker peace with warring groups and gain legitimacy. At a conference last month in Brussels, Ahmed pledged to do "everything imaginable" to stabilize Somalia.

Somalia has not had an effective government since 1991, when warlords overthrew longtime dictator Mohamed Siad Barre. The warlords then turned on each other, plunging the nation into anarchy and chaos. Somalia's transitional government was formed in 2004, but has failed to assert any control over the country.