MOGADISHU, Somalia — Thousands of Ethiopian troops have crossed into Somalia to join a large-scale offensive against al-Shabab extremists just weeks after Somalia's worst attack left more than 350 people dead, border residents said Thursday.

Somalia's president, vowing a "state of war," has visited countries in the region to seek more military support since the massive truck bombing Oct. 14 in the capital, Mogadishu.

Somalia is preparing for an offensive with African Union multinational forces that is meant to push al-Shabab fighters out of their strongholds in Lower Shabelle and Middle Shabelle regions, where many deadly attacks on Mogadishu and Somali and African Union bases have been launched.

Somali officials have said the United States military, which this year has stepped up the fight against al-Shabab with well over a dozen drone strikes, is expected to play a supporting role.

Abdullahi Yusuf, an elder in Luq town, told The Associated Press that Ethiopian troops in tanks and armored vehicles passed through Thursday morning toward southwestern Somalia.

Muhummed Muse, a resident of Dolow town, also said dozens of armored vehicles carrying Ethiopian troops had passed through.

Ethiopia's foreign minister, Workineh Gebeyehu, confirmed that troops had entered Somalia.

"It is a routine or normal military activity of the Ethiopian contingent based in Somalia to support the fight against terrorism," a foreign ministry spokesman, Meles Alem, told the AP. "Ethiopia is one of the troop-contributing countries under AMISOM," the African Union force.

Last month's bombing brought collective outrage in long-fractured Somalia, with thousands of Mogadishu residents marching in a defiant rally against al-Shabab. The country's Somali-American leader, President Mohamed Abdullahi Mohamed, faces the challenge of pulling together regional powers while the federal government tries to assert itself beyond the capital and other major cities.

Al-Shabab in some cases controls villages just dozens of miles outside Mogadishu.