The move comes after Kenya hosted the leadership of Somaliland, a breakaway state not recognised by Mogadishu, following months of tensions between the two neighbours.
Somalia has announced it is severing diplomatic ties with Kenya, accusing Nairobi of "recurring" interference in its political affairs as Mogadishu prepares long-awaited elections scheduled for early 2021.
Information Minister Osman Abukar Dubbe told reporters that Kenyan diplomats in Mogadishu had been given seven days to leave, and that Somalia's envoys were being recalled from Nairobi.
"The Somali government considers the people of Kenya a peace-loving community who want to live in harmony with other societies in the region. But the current leadership of Kenya is working to drive the two sides apart," he said in Mogadishu.
READ MORE: Kenya accuses Somalia of violating its territory in raising regional feud
"The government took this decision to respond to recurring outright political violations and interference by Kenya against the sovereignty of our country."
Somalia said that a meeting of the heads of state of East African nations had been convened for December 20 in Djibouti to discuss the issue.
Somalia has bristled for months over what it calls Kenya's meddling over its border, though officials did not point to specific grievances for its decision to break off diplomatic relations.
But the announcement came just a day after Kenyan President Uhuru Kenyatta received in Nairobi the president of the self-proclaimed independent Somaliland region of Somalia, Muse Bihi Abdi.
And Somalia has long resented what it believes is Kenya's support for Ahmed Madobe, the president of the Somali state of Jubaland.
Madobe is at odds with Mogadishu and has raised disagreements with the central government's roadmap toward Somalia's elections.
READ MORE: Explaining the Kenya-Somalia maritime dispute
The Horn of Africa nation is scheduled to vote in presidential and parliamentary elections in early 2021.
But the process has been hampered by political infighting between President Mohamed Abdullahi Farmajo and the country's regional leaders.
Nairobi has in the past accused Mogadishu of using Kenya as a scapegoat for its own political problems.
Kenya is a major contributor of troops to AMISOM, an African Union military operation fighting Al Shabab terror group, which is waging a violent insurgency across Somalia as they seek to unseat the internationally backed government in Mogadishu.
Kenyan Foreign Ministry spokesperson Cyrus Oguna said on Tuesday that Kenya had been "very kind and accommodating" to some 200,000 Somalis living in refugee camps in Kenya's east.
"We have a lot of commonality between these two countries, and anything that is capable of undermining that, is of course something that efforts must be put in place to ensure it is resolved," he said.
It is not the first time Kenya and Somalia's uneasy relationship has frayed in the open.
READ MORE: Is Kenya waging war on Somalia’s economic lifeline?
Kenya and Somalia agreed to "normalise" relations and start reissuing travel visas to each other's citizens in November 2019 after a long-running dispute over marine borders.
The countries have been engaged in a long-running territorial dispute over a stretch of the Indian Ocean claimed by both nations believed to hold valuable deposits of oil and gas.
The row over which nation controls access to the lucrative deposits escalated in early 2019 after Somalia decided to auction off oil and gas blocks in a disputed maritime area, prompting Kenya to recall its ambassador from Mogadishu in February of that year.