By Feisal Omar

MOGADISHU (Reuters) - A former Islamist lawmaker turned al Shabaab militant was one of the drivers in Tuesday's double car bomb attack on the African Union's main peacekeeping base in Somalia, al Shabaab said.

The militants said in a radio broadcast that Salah Nur Ismail, who joined al Shabaab in 2010, was one of those to blow himself up in the attack which killed 13 people, mainly guards from a private security firm.

In the broadcast aired late on Tuesday on the militants' radio al Andalus, Ismail, also known by the nickname of Badbaado, said in audio recorded before the attack that he would be one of the suicide bombers.

Government officials were not immediately available for a comment.

Somalia is scheduled to hold a presidential election next month and security analyst say al Shabaab could take advantage of the distraction caused by campaigning to launch more attacks.

Sheikh Abdiasis Abu Musab, al Shabaab's military operation spokesman, confirmed Ismail's participation in the attack.

"Salah defected from the parliament in 2010, joined us and repented and he became a martyr today," Abu Musab told Reuters.

"The current so-called Somali government lawmakers should follow suit. We are telling them to take part in the jihad via the same procedures," the spokesman added.

Ismail, who was from Somaliland, joined parliament in 2009 as one of 275 Islamists nominated by former President Sheikh Sharif Ahmed. He joined al Shabaab the following year, accusing the government of abandoning religious principles.

(Writing by Duncan Miriri; Editing by Raissa Kasolowsky)