Somalia's transitional parliament is to meet for the first time on home soil in the central town of Baidoa, more than 18 months after they were elected.
The speaker (l) and president (r) seem to have patched up their differences
The MPs have been divided over the question of whether they should be based in the capital, Mogadishu.
President Abdullahi Yusuf says it is too dangerous to work there and has been based in another town, Jowhar.
There has been no effective central government in Somalia since 1991. Rival militias have divided the country.
The decision was announced by speaker of parliament Sharif Hassan Sheikh Adan after talks with Mr Yusuf in the Kenyan capital, Nairobi.
Mr Yusuf said he would also attend the Baidoa meeting and address parliament.
"This is a very positive development," said UN envoy to Somalia Francois Fall.
"The future of their country is now in their [lawmakers'] hands."
Mr Hassan has led the group, which includes the major Mogadishu warlords, opposed to moving away from the capital.
He said the first meeting would be held on 26 February.
Baidoa is seen as a compromise between the two factions.
The announcement follows a deal reached in Yemen earlier this month.
However, Prime Minister Ali Mohammed Ghedi is unhappy with the deal and left Nairobi for Jowhar, before it was announced.
Mr Ghedi has been seen as an ally of President Yusuf, in opposition to Mr Hassan.
The BBC's Mohammed Adow says it looks as though there has been a shift in the alliances.
Analysts say this is typical of the stop-start Somali peace talks.
The 275-seat parliament was inaugurated in August 2004 after some two years of talks in Kenya.