Some 100 Somali MPs have backed a motion of no-confidence against President Mohamed Abdullahi Farmajo.
They accuse him of undermining the constitution by signing a secret deal, they say, to unite Somalia with Ethiopia and Eritrea.
The next stage is for the Speaker to set a date for the debate in parliament.
Relations have thawed between leaders of the three East African nations who have held a series of talks since Ethiopia’s reformist prime minister, Abiy Ahmed, was appointed in April.
Since the election of Somalia’s President Farmajo in 2017, there has been greater political stability. Previous administrations were rocked by disagreements between the president and the prime minister, leading to frequent political disputes that were often settled in parliament.