Ethiopia has made preparations for a conflict with the Islamists who control much of southern Somalia, Prime Minister Meles Zenawi has told MPs.
The Islamists have made rapid advances this year
The Islamists have repeatedly declared Jihad, or Holy War on Ethiopia, accusing it of backing their rivals in Somalia's interim government.
"This group represents a clear threat," Mr Meles said in Ethiopia's first prime minister's question time.
Some fear a regional war, as Ethiopia's rival Eritrea is seen as pro-Islamist.
The Union of Islamic Courts has denied claims by Ethiopia and the Somali government that it has links to al-Qaeda.
Some Islamist leaders want Somalia to take control of Somali-speaking areas of Ethiopia and Kenya.
Declaration of war
Mr Meles said he did not believe the peaceful path of negotiations with the Union of Islamic Courts (UIC) was completely exhausted but he said they could not close their eyes or look the other way when the country was being attacked.
He said the government had completed preparations to defend itself against UIC attack.
Opposition politicians said a resolution put forward by the ruling party calling on the house to back whatever moves the government thought necessary amounted to a declaration of war on Somalia.
A UN report this month accused Ethiopia and Eritrea, among other countries, of breaking an international arms embargo by supplying arms to Somalia.
The UIC further accuses Ethiopia of having thousands of troops backing government forces in Somalia.
Mr Meles has denied these claims but admits to having hundreds of military trainers in Somalia.
Eritrea equally denies claims that it has sent troops and weapons to the UIC.
Somalia's interim government only controls a small patch of territory around the town of Baidoa.