MOGADISHU, Somalia – A feud among Somalia's leaders over political appointments is jeopardizing efforts to rebuild the country after more than two decades of civil war, international officials said.

Prime Minister Abdiweli Sheikh Ahmed last week overturned President Hassan Sheikh Mohamoud's choice of justice minister, only for him to reinstate his candidate. More than 100 lawmakers agreed on Tuesday to support the prime minister's right to appoint his cabinet, said Abdiweli Mohamed Qanyare, a member of parliament.

Ali Nuur, a lawmaker who sides with Mohamoud, said Ahmed had "deliberately avoided" consulting the president on the change. Members of parliament have the right to hold a vote of no confidence in the prime minister if the president requests it, he said.

The disagreement sparked warnings by the United Nations and European Union that it is undermining efforts to rebuild the Horn of Africa nation's institutions. Somalia has been mired in civil war since 1991, when the dictator Mohamed Siad Barre was removed from power. The government is using recent military advances against the Islamist militant group Al-Shabab to try to attract investors to reconstruct its economy.

Somalia's efforts to achieve political targets set for 2016, including presidential elections, are "put at risk" by Ahmed and Mohamoud's disagreement, the United Nations secretary-general's special representative for Somalia, Nicholas Kay, said this week. He urged "all parties to seek a mutually satisfactory compromise that will allow Somalia's political and security progress to continue without interruption."

European Union Special Representative Alexander Rondos and Ambassador Michelle Cervone d'Urso called on the president and prime minister to "heed the advice of those who can offer pragmatic solutions, commit to work together and focus immediately on the nation's core priorities." These include establishing interim administrations, completing talks on a constitution and creating a transparent system to manage the government's finances, according to an e-mailed statement.

The E.U., a government donor, said it "remains ready to look at all options should these calls not be heeded and the situation deteriorates further."

Kay said he was concerned by "allegations of some MPs being asked to exchange votes for cash in the context of a potential 'no confidence' motion" in the prime minister, which he called "a disservice to Somalia's progress towards accountability and transparency."

Nuur dismissed those claims as "utter nonsense."