The government motion was endorsed by 125 MPs and rejected by 73 in the vote on Wednesday. The other MPs in the 275-member, clan-based assembly either abstained or were absent. Parliament sits in Baidoa, about 250km northwest of the capital Mogadishu.
On Tuesday, east African states, meeting in Nairobi, told Uganda and Sudan to prepare their forces for deployment under the African Union banner, once the United Nations modified an embargo imposed in 1992 that barred the entry of arms into Somalia.
Talks between the Somali government and the Islamic courts collapsed over the weekend. The Islamists would not countenance the deployment of foreign troops and walked out.
The victory of the Islamists in Mogadishu and the outlying town of Jowhar boosts their negotiating power, because the government has to depend on their goodwill to exert control across the nation.
The Arab League, meanwhile, has urged support for the transitional government in Somalia. It also wants an end to funding for the coalition of militia groups pitted against the Islamists.
"The situation in Somalia requires immediate end of support to the so-called warlords"
Amr Mussa, Arab League secretary-general
Amr Mussa, the secretary-general, said: "The situation in Somalia requires immediate end of support to the so-called warlords ... [it] necessitates support for the legitimate Somali government."
Samir Hosni, the league's senior Horn of Africa official, expressed displeasure that no invitation had been received to join a US-sponsored international "contact group" on Somalia.
The group was expected to meet in New York on Thursday to discuss ways to prop up the transitional government.
"The Arab League hopes the US administration reviews the contact group to include the most important international and regional players on the Somali issue, including the Arab League," Hosni said.