Abdurahman Mohamed Nur Dinari, a government spokesman, said Ali Mohamed Gedi was instead working to replace the 36 ministers who have quit the 102-member cabinet in the past week.
The ministers called for Gedi's resignation even after he escaped a vote of no confidence over the weekend.
"The prime minister is not going to resign. Instead he is consulting with the MPs who support him and clan elders to replace the ministers who have quit," Dinari told AFP from the government's temporary base in Baidoa, about 250km northwest of Mogadishu, on Thursday.
"There is no legal basis for the prime minister to resign," he added.
Dinari spoke as Somali President Abdullahi Yusuf Ahmed and parliament speaker Sharif Hassan Sheikh Aden held private consultations after they disagreed with Gedi on whether to engage the Islamist militia in peace talks.
He said the fallout was caused by Yusuf and Aden insisting on sending delegates to the Arab League-mediated talks with the Islamists in Khartoum against Gedi's call for a postponement of the second round talks.
Somalia's neighbours have been
warned not to interfere
"The prime minister made it clear that the two were not respecting the principle of separation of powers and that it was his responsibility to chose delegates," Dinari said.
The Islamists, grouped under the Supreme Islamic Council of Somalia (SICS), hold sway of much of southern Somalia, including the capital, which they seized after routing US-backed warlords in clashes that claimed at least 360 lives.
On Wednesday, the SICS chief Sheikh Hassan Dahir Aweys
invited ministers who had resigned to join his movement and lashed out at Gedi for allowing the deployment of Ethiopian troops that has split the country.
The SICS have said that they will not participate in the talks until the Ethiopian troops pull back, with some Islamists calling for war against their northern neighbour.
The United Nations, the United States and other Western countries have warned that any interference by Somalia's neighbours might scupper efforts to achieve lasting peace in the country.
The Somali government, formed in Kenya in late 2004 after more than two years of peace talks, was seen as the best chance for the lawless nation to set up a functioning administration since the ouster of dictator Mohamed Siad Barre in 1991.