Yemeni military planes on Monday struck at Al-Qaeda insurgents suspected of carrying out an ambush in which 17 army officers and soldiers were killed, tribal sources said.
The ambush, which took place on Saturday while an army patrol inspected a pipeline in Wadi Obaida area of oil-producing Maarib province, was one of the deadliest attacks by Al-Qaeda in recent months.
President Abd-Rabbu Mansour Hadi attended the funeral ceremony on Monday for the dead servicemen, who included Major General Nasser Mahdi Farid, chief of staff for Yemen's central military region, state news agency Saba said.
Government warplanes bombed the gunmen suspected of being behind the attack, tribal sources said. The air strikes started on Sunday and killed four people but it was not immediately clear if the victims were Al-Qaeda fighters or not.
Repairs have begun on the Maarib oil pipeline and power lines last week after the government reached a deal with tribesmen to stop attacking infrastructure.
Yemen has struggled to restore normality since Hadi took office in February following a year of protests that forced Ali Abdullah Saleh to step down after 33 years in power.
Yemen's stability is a priority for the United States and its Gulf allies because of Yemen's strategic position next to oil exporter Saudi Arabia and shipping lanes, and because it is home to a wing of Al-Qaeda.
The Yemeni-based Al-Qaeda in the Arabian Peninsula has mounted operations in Saudi Arabia and attempted attacks against the United States, which has stepped up strikes by drones.
The US-backed military offensive has driven the militants out of areas they seized in the south last year but has not prevented them from launching attacks that have dealt damaging blows to the army and security apparatus.
In June, the commander of military forces in the south of Yemen was killed by a suicide bomber in the port city of Aden.