MOGADISHU (Reuters) - The U.S. military said on Wednesday it had killed two militants in Somalia in an air strike targeting al Shabaab, an al Qaeda-linked Islamist group that is fighting to topple the U.N.-backed government.

The military’s Africa Command said the strike took place around 50 kilometers (30 miles) west of the capital Mogadishu on Tuesday, and that a “vehicle-borne improvised explosive device” had also been destroyed in the early morning attack.

Last month Washington warned of a threat to its diplomatic staff in Mogadishu and directed all non-essential staff to leave the city.

Al Shabaab was pushed out of Mogadishu in 2011 and has lost control of most of Somalia’s major towns. But the group retains a strong presence in the south and center and can still carry out major attacks. It was blamed for twin bomb blasts in Mogadishu in October that killed more than 500 people.

The militants aim to topple Somalia’s government, to drive out African Union peacekeeping troops and to impose the group’s own strict interpretation of Islamic law.