Somali insurgents are trying to topple the UN-backed govenrment
Eritrea has strongly denied allegations that it supports Islamist insurgents in neighbouring Somalia.
Salih Omar Abdu, its ambassador to Kenya, says the accusations, repeatedly made by the US and the African Union, are a "smear campaign".
He says Eritrea is in favour of a united Somalia whose government represents all of its people.
Somalia is nominally ruled by a UN-backed government but insurgents control large parts of the country.
Last week US Secretary of State Hillary Clinton, on a visit to Africa, warned that the US would "take action" against Eritrea if it continued to support the militants.
She said Eritrea was destabilising Somalia and its actions were "unacceptable".
But in an interview with the BBC's Network Africa programme, Mr Abdu dismissed the claims.
"This is a smear campaign against Eritrea under the pretext that Eritrea supplies arms, ammunitions and finances [to insurgents]," he said.
"But unfortunately this is not the case and Eritrea does not tolerate being an instrument to any country or any government."
He said his country had a "moral and legal obligation to support the Somalis", but had no right to "bring or establish a government for the Somalis".
"We believe in a united Somalia. Not like our neighbours who want to sub-divide it into cantons. Let the Somalis solve their problems themselves."
Analysts say several militant groups operated from Eritrea after being ousted from the Somali capital, Mogadishu, when Ethiopian troops entered Somalia in 2006.
The main insurgent group is al-Shabab, which is extending its influence in the south of the country.
About 250,000 Somalis have fled their homes in fighting between militants and government forces over the past three months.
There are growing fears that Somalia - which has been without an effective central government since 1991 - risks becoming a haven for terrorists.