A masked gunman assassinated a Yemeni security official at the U.S. Embassy in a drive-by shooting in the capital Sanaa on Thursday, officials said.

The Yemeni officials said the killing bore the hallmarks of an Al Qaeda attack, but it was too early to determine if the group was behind it. They spoke on condition of anonymity because they were not authorized to speak to the media.

The assassination resembles other attacks targeting Yemeni intelligence, military and security officials in retaliation for a wide military offensive by Yemen's U.S.-backed government against Al Qaeda's branch in the country.

Yemen-based Al Qaeda in the Arabian Peninsula, which Washington considers the most dangerous offshoot of the terror network, had taken advantage of a security and political vacuum created by last year Arab Spring-inspired uprising and seized territories and cities in the south. The government-led offensive has pushed the militants out to mountainous areas from where they have been staging suicide attacks and assassinations inside cities.

Two weeks ago, a top intelligence official, Col. Abdullah al-Ashwal, was also killed in a drive-by shooting in Sanaa.

The embassy security official was identified as Qassem Aqlani, in his fifties. He was on his way to work when the gunman on a motorcycle opened fire at him and fled the scene. The attack was in western Sanaa, close to his home, while the embassy is located in eastern Sanaa.

Aqlani had been working for the U.S. Embassy for nearly 20 years.