Suspected al Qaeda militants killed about 30 people in attacks on two military targets in south Yemen on Friday, security officials said.
Around 20 died when two car bombs exploded at a military camp in al-Nashama and about 10 were killed by gunmen in the town of Mayfaa.
Officials believe members of al Qaeda in the Arabian Peninsula (AQAP) were behind both attacks, the security sources said. AQAP is seen by Western countries as one of the most dangerous branches of al Qaeda because it has attempted to carry out bombings on international airlines.
A concealed bomb in one car exploded among a group of soldiers at the gate of the al-Nashama camp as the driver sought to enter. The other was already inside the camp when it exploded, one of the security sources said.
In Mayfaa, gunmen opened fire on a military headquarters, killing around 10 people, before escaping in stolen army vehicles, local residents said.
Maintaining stability in impoverished Yemen is a priority for Washington and Gulf states because of its location next to major oil shipping routes and Saudi Arabia, the world's top oil exporter.
Both attacks took place in Yemen's southern Shabwa Province, a lawless, rugged area that has been the scene of much fighting in recent years between Islamist militants and the security forces.
Militants took advantage of political chaos in Yemen during the Arab Spring in 2011 to seize control of some towns and surrounding areas in the south of the country.
They were beaten back by Yemeni forces with assistance from the United States last year but have continued to stage attacks against government and military targets.
Islamist militants have assassinated dozens of Yemeni security and military officers in southern provinces including Shabwa over the past two years, often using car bombs or in drive-by shootings.
Two senior officers were killed in Hadramout province, to the east of Shabwa, earlier this month.
Yemen is also facing other domestic threats besides AQAP, including a growing secessionist movement in the south and a rebellion by the Houthis, a group of Zaydi Shi'ite Muslims, in the north of the country.