This is a 2012 timeline of events in the Somali Civil War (2009–present).
January
January 7 Kenyan military claims that it had killed 60 Al-Shabaab fighters with an air strike. A Kenyan army spokesperson also said that 20 al-Shabaab fighters had defected.
January 20 Transitional Federal Government forces and their AMISOM allies launch a successful offensive against al-Shabaab positions on the northern outskirts of Mogadishu. The move was intended to secure the city's outer perimeters from external attack. Two AMISOM soldiers were wounded in the ensuing battle.
January 24 Al-Shabaab launches a suicide attack against an Ethiopian military base in Beledweyne. The group claims it killed 10 Ethiopian soldiers.
February
February 15 African Union forces say they launched a major assault on Afgoye, an important al-Shabab base in Southern Somalia. A BBC Correspondent said an African Union force of 100 tanks and armoured vehicles were within 10 km of Afgoye.
February 18 Somali police arrested a suspicious driver. While waiting for a bomb disposal unit in front of the criminal investigations department a bomb in the car detonated injuring two police officers. Al-Shabab claimed the bomb was detonated remotely.
Februdary 22 Reuters report Ethiopian and Somali troops seized the strategic city of Baidoa after al-Shabab withdrew earlier in the day.
February 24 An air strike in the al-Shabab-held K60 region destroyed two cars and killed at least six people including foreigners. It is unknown who carried out the attack. Kenya denied any involvement.
March
March 2 African Union forces and pro-government militia captured Maslah, an important al-Shabaab base 5 km north of Mogadishu. Al Shabaab fighters attacked Puntland checkpoints at Bosasso on March 2 and Baliqadar on March 3 morning. Al Shabaab spokesman said the group has killed 32 Puntland soldiers and lost three of its own fighters. Puntland soldiers pursuing the militia after the attack killed seven insurgents.
March 3 Militants from al-Shabaab took over Diif in Lower Juba. Kenyan army along with TGF and Ras Kamboni clan militia managed to retake the village the following day after several hours of fighting.
March 10 Al-Shabaab fighters clashed with Ethiopian army in the village of Yurkut in what is described "the most intense fighting since Ethiopian forces entered Somalia" that left 40 Ethiopian soldiers killed.
March 19 Dozens of mortar rounds were fired at Somalia's presidential compound in Mogadishu but missed and landed on a nearby refugee camp, killing six civilians. Al-Shabaab claimed responsibility for the attack, the first of such kind since August 2011.
March 20 Al Shabaab raided Dhusamareb at dawn, briefly captured the city then fled after intense fighting with Ahlu Sunna Waljama'a (ASWJ) fighters, which claimed 100 Al Shabaab militants were killed. Al Shabaab denied the claim and announce it had killed 15 ASWJ troops and captured 6 vehicles. Al Shabaab fighters again recaptured Diif in Lower Jubba region, without any resistance, from Raskamboni militia led by pro-Somalia government Sheik Ahmed Modobe, who abandoned the area before insurgents poured in. Al Shabaab militants however fled the town after briefly occupying it for few hours, paving way for TFG and Raskamboni troops to return taking full control of the town. There are reports of air strikes bombing Diif in the aftermath of its capture, killing 37 al-Shabaab fighters.
March 22 Ethiopian and Somali troops seized Hudur, the administrative headquarters of Bakool region from al-Shabaab militants.
March 23 Kenyan jets carried out an airstrike on the outskirts of Fafadun town near Kenya border, hitting three al-Shabaab training camps. At least 10 al-Shabab fighters were killed and 25 others, including woman and children, were injured.
March 24 Central Somalia front: ASWJ fighters liberate Waradhumale and Gobo from al-Shabaab forces while large Ethiopian forces begin to move into Guri'el and Dhusamareb, prepare for an offensive on the al-Shabaab controlled town of El Bur situated 100 km away.
March 26 Ethiopian troops and the pro-government militia Ahlu Sunna Waljama'a seize the Central Somali town of El Bur.
March 30 AMISOM reported that African Union troops and Somali government forces attacked and seized the key district of Deynile near Mogadishu, which served as a staging ground for al-Shabaab forces attacking Mogadishu, Afgoye, Balad, and other major cities. Despite denials by al-Shabaab spokesmen, African Union troops claimed to have captured the entire area, including an airstrip and a local hospital. 20 al-Shabaah fighters and one Burundian soldier were reportedly killed.
March 31 Fresh fightings erupted east of Jowhar in region of Middle Shabelle between al-Shabaab and local militia, leaving 8 people dead.
April
April 4 A bomb exploded at the reopened national theater in Mogadishu, where Somali Prime Minister Abdiweli Mohamed Ali and several other dignitaries were commemorating the first anniversary of the launch of Somalia's first national television station. Eight people were confirmed to be killed in the blast. Among the dead were Aden Yabarow Wiish, who served as President of the Somali Olympic Committee, and Said Mohamed Nuir, Chief of the Somali Football Federation. Prime Minister Mohamed escaped unharmed. Al-Shabaab claimed responsibility for the attack, having used improvised explosives rather than committing to a suicide attack.
April 9 An explosion occurred in a busy marketplace in the city of Baidoa after a bomb planted in a basket was detonated; the local governor reported that at least twelve people were killed in the blast, most of them allegedly women and children. The bombing occurred just as Somali forces loyal to the government and African Union peacekeepers arrived to reinforce their hold on the city. It has yet to be determined who's responsible for the blast, though most suspect al-Shabaab as the likely culprit.
April 11 To reinforce their ties with al-Qaeda elements in nearby Yemen, militants loyal to al-Shabaab are reportedly moving northward towards the Golis mountain range, located in the Bari and Sanaag regions. The President of the autonomous Puntland region Abdirahman Farole has announced his intention to deploy military forces to respond to any threat posed by the insurgents to the territory.
April 28 A South African private security contractor is killed by gunmen while on a mission targeting pirates in Puntland.
April 29 Al Shabaab insurgents clashed with Somali and AMISOM forces in Dharkenley and Hoosh district, north of Mogadishu, killing 4 civilians. In a separate incident, 3 people are killed and 10 injured in Hodan district when Al Shabaab attacks a movie theater by grenades.
April 30 At least 11 people were killed when Al Shabaab insurgents clashed with Somali and Ethiopian troops in an overnight attack at Hudur.
May
May 1 Seven people, including two MPs were killed in a suicide bombing in Dusa Mareb. Several other MPs and prominent politicians, including former Security Minister Ahmed Abdi Salam, were also injured. Al-Shabaab claimed it was behind the attack.
May 19 Multiple explosions in various locations in Mogadishu kills 7 TFG and AMISOM troops in addition to 1 civilian, and injures at least 15 other people. Meanwhile, joint Somalia-Kenya forces took part in heavy fighting against al-Shabaab near the village of Tabta.
May 25 Somali government forces backed by African Union tanks reportedly capture the Islamist stronghold of Afgooye, located on the outskirts of Mogadishu. The town was considered strategically important, as it offered al-Shabaab insurgents direct access to the capital. Thousands of people on the outskirts of the town fled toward Mogadishu and Afgooye ahead of the offensive, with international aid now likely to reach them. No civilian casualties were reported. According to the BBC, securing Afgooye essentially cuts the militant group's controlled territory in half.
May 29 Kenyan naval forces shell Kismayo after al-Shabaab insurgents opened fire on Kenyan patrol vessels on the Somali littoral. Militants ambush a convoy of vehicles carrying President Sharif Ahmed travelling from the newly liberated town of Afgoye back to Mogadishu. The attack was repelled and Ahmed returned safely to the capital.
May 31 Somali government forces and African Union troops from Kenya capture Afmadow from al-Shabaab, a southern town considered important in the military campaign owing to its network of roads that grant access to many different parts of the country. Prime Minister of Somalia Ali also announces that Kismayo, situated 115 km (71 miles) to the south and the seat of al-Shabaab's headquarters, would be the next likely target, followed by other towns and cities in the larger region.
June
June 6 Tensions reported by local residents in the Bari province of Puntland, after the autonomous region's government forces clashed with Ras-Casayr militias. Puntland officials indicate that they entered the town of Bargaal to repel pirates.
June 11 Self-appointed President of Ras-Casayr enclave in the Bari province renounces sovereignty claims, indicating that he is content with the Puntland government's development projects in the region and averring that he will now support the administration.
June 16 A suicide car bombing at a military base in Afogye where Somali and African Union soldiers were staying kills two Somali soldiers and injures three civilians. Al-Shabaab assumes responsibility for the explosion. No AU injuries were reported, but al-Shabaab claims that it killed several AMISOM soldiers.
June 22 Al-Shabaab fighters ambush a Somali military convoy in the Elasha Biyaha neighborhood of Mogadishu, killing the local police chief.
June 23 AMISOM troops wrest control of the Middle Shabelle region's Esaley Airstrip and Elma'an Port from al-Shabaab. Situated about 37 km northeast of Mogadishu, the Esaley Airstrip was strategically important for the insurgent group since it was used by the militants to transport illicit weapons and to fly in foreign fighters from the Gulf of Aden.
June 26 Somali government forces assisted by AMISOM soldiers and tanks capture the al-Shabaab stronghold of Balad, situated 30 km (20 miles) to the north of Mogadishu, in addition to the surrounding villages. The insurgents reportedly fled the area prior to the arrival of the allied troops. Securing Balad gives the Somali authorities and AMISOM control of a key bridge over the Shebelle River leading toward Jowhar and more northerly areas.
July
July 11 AMISOM and pro-government forces captured the al-Shabaab stronghold of Lanta-Buro 25 miles (40 km) west of Mogadishu; the city had been one of al-Shabaab's primary training bases for militant forces across the country. The city was reportedly abandoned by al-Shabaab before the offensive force arrived and no fighting was reported. According to the combined Somali-AMISOM leadership, the next target of the offensive would be the coastal city of Merka.
August
August 4 Somali forces engaged in battle with al-Shabaab insurgents in the town of Qansah Dhere, at least 15 people were killed.
August 8 Kenyan jets bombed an al Shabaab base near the Birta-Dheer village north of Kismayu. Kenyan forces also reportedly massing tanks and artillery around Biibi village, 85 km north of Kismayu in an attempt to take this port town.
August 12