Yemeni government forces detained 10 al Qaeda-linked fighters on Friday, a security source said, after an attack in a town that underscored the security challenges of next week's presidential election.
Separately, oil pipeline workers returned to work after a 10-day strike which had shut down oil exports, Yemeni officials and Norwegian energy firm DNO said.
On Wednesday, Islamist militants shot dead a military officer and an election official in the town of Baydah, about 130 km (80 miles) southeast of the capital Sanaa.
The militants opened fire on a car carrying Khaled Waqaa, the leader of a brigade of the elite Republican Guard, killing him as well as the head of Baydah's election committee, Hussein al-Babli, his son and two soldiers. Ten people were wounded.
Yemenis vote on February 21 to pick a leader to replace President Ali Abdullah Saleh, now in the United States for medical treatment, amid concern that violence - and the fact there is only one candidate, his former deputy Abd-Rabbu Mansour Hadi - could depress the turnout.
Pipeline workers, who are employees of state-owned oil firm PetroMasila, returned to work on Friday, ending their strike, a government official told Reuters.
A union official said: The purpose of the action was to bring the workers' grievances to the attention of the government. The strike has now ended.
Norway's DNO said it was about to restart production at several Yemeni oilfields after workers returned to the job.
The company on Tuesday ceased production of some 4,500 barrels of oil per day due to the strike.
The strike had stopped Yemen's oil exports, a further blow to the economy of the small oil producer whose government has faced a year of protests and challenges from northern Shi'ite Muslim rebels, southern separatists and Islamist militants.
Weakened by the upheaval, Yemen's government has lost control of swathes of the country, giving al Qaeda's regional Yemen-based wing room to expand its foothold near oil shipping routes through the Red Sea.
MILITANTS SAY TARGETED OFFICER
Militant group Ansar al-Sharia claimed responsibility for Wednesday's attack but said it targeted only the military commander to avenge the government's failure to fulfil its half of a deal under which Islamists quit a town they had seized.
Militants agreed last month to pull out of Radda, about 170 km (105 miles) southeast of Sanaa, in exchange for the formation of a council to govern it under Islamic law and the release of several jailed comrades.
The militants' spokesman said that instead of setting up such a council, Republican Guard forces had entered the town. He warned the assassination was just a preliminary response.
Saleh formally handed power to Hadi in November as part of a Gulf-brokered plan to end months of anti-government protests that paralysed the impoverished state for most of 2011.
(Reporting by Mohammed Ghobari in Sanaa and Mohammed Mukhashaf in Aden; Writing by Firouz Sedarat; Editing by Mark Heinrich)