Afewerki's comments came as a senior UN envoy held talks in Mogadishu on Thursday with Abdullahi Yusuf, the Somali president, to discuss the deployment of African peacekeepers.
Meanwhile, Sharif Hassan Sheikh Adan, the recently ejected speaker of Somalia's parliament, said on Thursday that the east African nation risked sliding into dictatorship and accused Abdullahi Yusuf, the Somali president, of seeking to rule by force and fear.
Adan told Reuters in an interview in Rome: "There is a dictatorship risk and some of the elements are already in place, such as the emergency legislation. The president believes he can rule by force. ... He will try to rule the country alone, with the help of Ethiopian troops.
"He is cleansing out those elements who are against his point of view, not just me but also other members of parliament who oppose him."
African and Western diplomats are trying to rally a peacekeeping force of at least 8,000 troops to restore calm in the country and avoid the creation a power vacuum.
Ethiopia wants to withdraw it forces from the country within weeks.
"Peace is possible if the interests of US and the Ethiopians are removed"
Ahmed, Bossaso, Somalia
Send us your views
However, Afewerki, whose country has maintained a bitter enmity with its neighbour since independence in 1991, said Ethiopia has become involved in a "quagmire".
A border dispute and fragile truce between Eritrea and Ethiopia has lasted for four decades.
In an interview with Al Jazeera's Andrew Simmons broadcast on Thursday, the Eritrean president said that no one had been defeated yet in Somalia.
Afewerki said: "The Islamic Courts have not been defeated, the Somalis have never been defeated. People who have wanted to intervene for their own agendas in Somalia have put themselves in a very serious circumstance.
"This is a quagmire and time will tell who has been defeated and what we witnessed evolve the last few weeks."
Afewerki has openly supported the Islamic courts in their conflict with the Somali government, but denies sending any troops and rejects suggestions that the group's recent defeat was a defeat for Eritrea.
"We have all along supported Somalis everywhere. We have not discriminated, we wish Somalis peace and stability after 15 years of chaos, we want to see peace," he said.
Afewerki said the AU lacked the "organisational capability" to deploy effectively in Somalia.
"We need to know what will be the mission and second, how would the African Union which is proved to have failed in other parts [of Africa]."
Meanwhile, Francois Fall, an envoy for the UN, has urged the Somali government to work towards reconciliation saying a peacekeeping force represented "the best opportunity for peace for 16 years in Somalia" and must not be wasted.
|"This is a quagmire and time will tell who has been defeated and what we witnessed evolve the last few weeks"|
President Isaias Afewerki
Amid continuing criticism over the controversial sacking of the parliament's speaker on Wednesday, the envoy told the Somali president on Thursday that it was vital for his government to engage in dialogue with all sides.
The government, however, defended the speaker's removal, calling it as a decision for the Somali people and no one else.
Mohammed Adow, Al Jazeera's correspondent in Mogadishu, said that despite the talk of an AU force deployment in Somalia by the end of the month, only Uganda has made a clear commitment to send troops.
He said that since a US attack in the southern tip of the country aimed at alleged al-Qaeda suspects, countries such as South Africa and Nigeria have become hesitant over getting involved in an AU force as any sending of troops could seen as endorsing the US-led war on terror.