Somalia's prime minister on Thursday expelled the African Union representative because of acts incompatible with his status though Somalia's president rejected the order, signalling a new rift between the Somali leaders.
Prime Minister Mohamed Hussein Roble's office said the African Union representative, Francisco Madeira, must leave within 48 hours.
"The Somali government declares the special representative of the African Union ... Ambassador Francisco Madeira, persona non grata for engaging in acts incompatible with his status," the prime minister's office said.
It did not give details of what Madeira had done that led to the expulsion.
Madeira, who is from Mozambique, was not immediately available for comment and an official at the African Union office in Mogadishu said it would have a response later.
Ebba Kalondo, spokesperson for the African Union Commission Chairperson in neighbouring Ethiopia, did not immediately respond to a Reuters message seeking comment.
The expulsion order looked set to worsen a political dispute between Roble and President Mohamed Abdullahi Mohamed, which Somalia's supporters worry will distract from its campaign against the al Qaeda-linked al Shabaab militant group.
African Union peacekeeping troops help the government fight al Shabaab.
Mohamed's office said in a post on Twitter it was the custodian of Somalia's sovereignty and said Roble's order to expel Madeira was an "illegitimate and reckless decision from an unauthorised office".
The office said the federal government led by Mohamed "has received no complaints of interference with its sovereignty and doesn't endorse any illegal action" against him.
In December, Mohamed tried to suspend Roble's powers for suspected corruption, which Roble denounced as a coup attempt.
The two have had a long-running dispute with the latest focus of their rivalry being delayed parliamentary elections, which started in November.
The parliamentary elections involve clan elders picking the 275 members of the lower house by an April 15 deadline. They will then choose a new president.
Data from the election commission shows that 255 of the lawmakers have been elected.
(Reporting by Abdi Sheikh; Additional reporting by Addis Ababa Newsroom; Writing by George Obulutsa; Editing by Robert Birsel)