Ethiopia's prime minister has warned parliament that Somali Islamist fighters are massing near the border.
President Yusuf said the hardliners now controlled the Islamists
Meles Zenawi said Ethiopian troops were ready to defend themselves against possible attack.
He also said he had sent military trainers to help Somalia's beleaguered government but they were not to fight.
Somalia's Islamists have declared "holy war" on Ethiopia, raising fears of a regional conflict. They deny Ethiopian claims they have al-Qaeda links.
There have been several eyewitness reports of hundreds of Ethiopian troops in Somalia.
Meanwhile, Somalia's President Abdullahi Yusuf has accused the Union of Islamic Courts of flying the "black flag of the Taleban" and al-Qaeda, reports the AFP news agency.
Islamist radicals from Afghanistan, Chechnya, Arab nations and Europe "make up a considerable number" of UIC forces, which were now dominated by hardliners, he said.
"The [Islamists] draw massive, material, financial and military support from international terror networks," he told a meeting in Kenya of the International Contact Group on Somalia led by the United States.
He also accused the UIC of plotting to assassinate government members. He survived a suicide bomb attack last month.
At the meeting, US Assistant Secretary for African affairs Jendayi Fraser accused Ethiopia's rival, Eritrea, of arming the UIC.
"I think Eritrea is quite clearly attacking Ethiopia on another front. We have pretty clear evidence. [Eritrea is] shipping arms into Somalia," she said.
The UIC did not attend the meeting, as they had been expected to do.
Mr Meles did not say how many military trainers were in Somalia but accused the UIC of attacking targets inside Ethiopia.
"We have the right to defend ourselves against these people. We have been very patient throughout this ordeal," he told parliament.
"If the incursion continues... the armed forces have a duty to respond to that. But at this moment, it has not reached this level."
Earlier this month, residents of a Somali town said that Ethiopian troops had helped government forces briefly take a town from the Union of Islamic Courts.
The UIC immediately vowed to wage a "holy war" in revenge.
The town of Bur Haqaba lies on the road from the government base in Baidoa to the Islamist-held capital, Mogadishu.
Earlier, the BBC's Mohammed Olad Hassan in Baidoa saw a convoy of Ethiopian army trucks pass through, with about 200 troops.
Somalia has not had a functioning national government since 1991.