"The bodies of two were ripped apart in the explosion, which happened before they were able to execute their attack," the the Interior Ministry said in a statement, late on Saturday,
Yemeni security forces, fighting a growing Islamist insurgency, said they had also detained four Somali men suspected of belonging to the al Shabaab militant group near the site of the explosion. There was no indication that they were linked to the bomb plot, the statement said.
The al Qaeda-allied Somali group had sent 300 armed men to fight alongside the Yemen-based wing of the militant network, it said. The four Somalis were captured on the road between the southern provinces of Lahej and Abyan.
The two dead men were identified by the ministry as Yasser and Muneef al-Hawi. The statement said they were killed in Abyan province's Mudiyah district. It gave no further details on whether the men were associated with al Qaeda.
U.S. drone attacks killed at least 25 al Qaeda-linked fighters on Saturday in southern Yemen, where militants have expanded their operations during a year of unrest that ousted former President Ali Abdullah Saleh.
Saturday's operation was the biggest since Yemen's President Abd-Rabbu Mansour Hadi took office last month vowing to fight al Qaeda.
Thirty-four al Qaeda militants were also killed in a Yemeni air force raid on Friday in al-Bayda, the governor of the southern province was cited as saying by the defence ministry on Sunday. The death toll had previously been put at 20 militants.
The governor said two Pakistanis, two Saudi nationals, and one Syrian and one Iraqi were among the dead. Four of the men killed were senior militant commanders, he said, without giving further details of their identity.
Ansar al-Sharia, an al Qaeda-linked militant group based in southern Yemen, has exploited a year of anti-government protests that have severely weakened central government control over parts of the country to seize several towns in the south, notably in Abyan province.
The United States and Saudi Arabia, Yemen's neighbour and the world's biggest oil exporter, are concerned about al Qaeda's expansion in Yemen where the group controls swathes of land near oil shipping routes through the Red Sea.