At the airstrip, there was plenty of military might on display: hulking tanks, heavy artillery and dozens of alert troops.

We are told Somali pro-government soldiers were backed by the Ethiopians as they seized the town from al-Shabab but it is clear who is the dominant partner in this relationship.

Inside Baidoa’s presidential palace there are signs of the just departed Islamist militants. The walls of this battered, squalid building are covered in jihadist graffiti – mostly images of guns apparently drawn by very young al-Shabab recruits.

« They preach to them, so these kids think only about jihad, » says Ethiopian army Capt Mahammud Yissak.

« We saw very small guys between eight and 12. They had been in the al-Shabab training camps. They ran away and we welcomed them. Some of them were used as couriers to plant explosives. »

On display in the compound were the ingredients of the brand of terror preferred by al-Shabab these days: detonators, batteries and switches for bombs or mines that can be set off by remote control.

Nearby were several technicals (the four-wheel drive vehicles with machine guns mounted on the back) that had been captured from or abandoned by al-Shabab.

The militants put up little resistance when the tanks and troops closed in on the town but since then al-Shabab has promised blood in Baidoa.

It is extraordinary to think that just over three years ago Somalis were cheering on the streets as the Ethiopian army made its very public withdrawal from the country.

That incursion ousted the Union of Islamic Courts (UIC), which controlled much of the country.

But the Ethiopian presence became so unpopular – partly as a result of the shelling of civilian areas of the capital, Mogadishu – that it then helped trigger the rise of the more radical al-Shabab.

« Never again » was Ethiopia’s view on another major military incursion in Somalia, but – with al-Shabab threatening the stability of the entire region – it felt forced to act.

On an embedded visit with the Ethiopian army, it was always going to be hard to gauge the sentiments of Baidoa’s residents.

In front of Ethiopian soldiers a group of elders stroked their henna dyed beards as they spoke to the media.

« We welcome our brothers from Ethiopia. We work with them. We’ve had many meetings with Ethiopian commanders to help stabilise this place, » says Moalimu Ali.

« Al-Shabab colonised us for three years and 12 days. So many of us were killed or displaced. They forced our youth to join them. We are telling them to leave al-Shabab. »

Hearts and minds battle

Al-Shabab’s extremist views and its appalling handling of the recent famine make it widely unpopular amongst Somalia’s population.

This certainly dilutes any hostility there might be to Ethiopia’s current intervention.

It was a very different situation in 2006 when the ICU had brought a degree of peace to this troubled nation and had considerable support.

Ethiopia’s military action back then was strongly backed by the US that feared the rise of the Islamists – a position Washington might regret now in view of what has happened since.

But is there a danger of Ethiopia getting bogged down in this complicated conflict and once again being portrayed as an unwanted foreign force?

« I don’t think so – we don’t want to stay long, » says Capt Yissak.

« We want to stabilise Somalia. After the country has settled we’ll leave. People are asking us to stay for a long time. Our government says stay until peace comes, then we go back.

« We are training the government police and military, and after they’ve become strong we will leave. »

But there are signs that Ethiopia may find it hard to win over all the hearts and minds.

Al-Shabab has warned businesses not to co-operate with the new men in charge, and many shops have remained closed.

This is partly because people feel the battle for Baidoa may not be over. It is not clear how long the Ethiopians will stay, so there is a fear that al-Shabab could return and carry out retribution.

Fighting, not talking

In February 2006, Somalia’s Transitional Federal Government (TFG) set up home in Baidoa as Mogadishu was too dangerous.

The country’s third-largest city then fell into the hands of al-Shabab in January 2009 – straight after the Ethiopians had withdrawn.

One man who is glad to be back home is Muhammad Ibrahim Habsade, a former minister in the TFG and a local MP.

« I was the last out of Baidoa when the government left and I was the first one to return. I am happy to be back… but many things are destroyed, » he says.

« It’s like Baidoa was hit by an earthquake – al-Qaeda is like an earthquake.

« People are requesting the Ethiopian troops to stay for a long time. People have become free in the last 10 days. Now they need a lot of humanitarian support, » Mr Habsade adds.

He is amongst the politicians of the Bay and Bakol region hoping to establish a self-governing state under a federal government.

But would al-Shabab fighters, like the senior commander Sheikh Mukhtar Robow who is from Baidoa, be welcome to join that administration?

« Not only Robow. All of them would be welcome if they leave the terrorists, changed their way of thinking and came to live peacefully. »

Before dismissing the idea of an al-Shabab commander rising to help run a legitimate administration, it is worth remembering what became of the head of the UIC after the group was swept from power by Ethiopian troops. Sheikh Sharif Sheikh Ahmed is now Somalia’s president.

For now though al-Shabab appears to be more focused on fighting than talking.

Just hours before I flew into Somalia, al-Shabab fought for hours in an effort to capture Garbaharey, 150km (95 miles) to the west of Baidoa.

Then hours after I had left Somalia there was an explosion in Baidoa, and the authorities rounded up dozens of men on suspicion of al-Shabab links.