* Second attack in as many days near presidential palace
* Follows big army offensive against al Qaeda in south Yemen (Adds background)
SANAA, May 11 (Reuters) - Three gunmen were killed after they tried to attack a security checkpoint in the Yemeni capital early on Sunday, the interior ministry said, the second such incident close to the presidential palace in Sanaa in as many days.
The attack appeared to be retaliation for an army offensive against al Qaeda that has ousted many militants from bastions in south Yemen first seized during mass unrest in 2011, endangering national security and oil-exporting Saudi Arabia next door.
Sunday's clash came two days after a gunfight near the palace and what appeared to be an assassination attempt on the defence minister in the southern province of Shabwa.
"Three terrorists were killed at dawn today in a new attack that targeted a security checkpoint," the interior ministry said in a statement, adding that a fourth gunman was wounded and a civilian bystander was also killed.
On Saturday, a bomb exploded close to the house of Yemeni President Abd Rabbu Mansour Hadi in the southern port city of Aden, a security source said. No one was wounded and there was no damage to Hadi's home.
Keen to stem a stubborn Islamist insurgency that has targeted security forces, military facilities and foreigners, Yemen's army went after the militants last month in the provinces of Shabwa and Abyan.
The army, which conducted a similar, ultimately ineffective campaign against al Qaeda in 2012, has pledged to continue to pursue militants who had retreated from towns in Shabwa and Abyan into the rugged desert hinterland. State news agency Saba reported the killings of seven militants on Saturday.
Western powers are concerned that al Qaeda in the Arabian Peninsula (AQAP) could use Yemen, which neighbours top oil power Saudi Arabia, as a springboard for future international attacks. (Additional reporting by Mohammed Mukhashaf; Reporting by Mohammed Ghobari; Writing by Yara Bayoumy; Editing by Mark Heinrich)