The farmers in Afgoye, a town on the outskirts of Mogadishu long controlled by Islamist militants, didn't even wait to clear away the bullet casings from last week's battles before filling up trucks with produce to drive into the capital.

Farmers here are rejoicing at the taking of Afgoye by African Union peacekeepers on Friday after three days of fighting because they will no longer have to pay up to 50 percent of their crops in "taxes" to al-Shabab militants. The military operation marked the AU's biggest success in Somalia since the peacekeepers pushed the militants from the capital Mogadishu last August.

Since Afgoye's fall, dozens of vehicles carrying fresh fruits and vegetables have traveled from the farm town into the Somali capital, which last year experienced the region's worst famine in 18 years. The famine was declared over in January.

Some farmers hope they will be able to produce more crops now that the insurgents have been driven out. Tractors were already out in the fields this week, plowing more land. The farmers say hope has returned and they aim to plant sorghum, maize, bananas, mangos and other items.

Mohamed Hussein said he hoped to grow and sell more lemons since he would not have to pay such high taxes anymore. He recalled life under al-Shabab's strict rule as he supervised lemons being loaded onto vehicles at his store.

"We waited for this for a long time because we were the most affected," he said, looking out of a speeding car carrying bananas. "They took 50 percent. Many of us gave up farming. I hope the army's presence will soothe the town."

During the years when the town was under militant rule, many people soured on farming or fled the region. Even as crop production fell, hundreds of thousands of Somalis flooded into Afgoye from Mogadishu, seeking an escape from the years of fighting in the capital.

The taking of Afgoye is the latest success against al-Shabab militants. After African Union forces primarily from Uganda and Burundi pushed out the insurgents from Mogadishu, Kenyan troops began pressuring al-Shabab from the south and Ethiopian troops pushed in from the west.

The three-pronged offensive has given the African coalition the best chance in years of taking back control of Somalia to allow some nascent form of government to begin providing services.

Militants have increased bomb attacks as the territory they control shrinks.

On Tuesday al-Shabab fighters ambushed the convoy the Somali president was traveling in after he visited Afgoye, said Lt. Col. Paddy Ankunda, spokesman of the African Union military force. The attack was repelled and the president safely returned to Mogadishu, he said.

UNHCR said on Tuesday that 14,000 people fled Afgoye over the last week, and that 10,000 have reached Mogadishu, where the aid community is providing assistance.

Nur Saney returned to Afgoye over the weekend after two years of life in Mogadishu. He had fled his farm because of the high taxes and on Sunday he was back on it, clearing weeds.

"I hope for better days ahead," he said.

Still, many in this agricultural town worry that irregularly paid government soldiers may become the next illegal tax collector.

Abdikarim Yusuf Dhagabadan, the chief of Somalia's armed forces, told reporters he has warned soldiers not to take money from citizens.

"We shall arrest any al-Shabab we see but we shall shoot to death any soldier on the spot who is robbing civilians," he said.