The Yemeni chief of security at the US embassy in Sanaa has been assassinated, security officials have said.

Qassem Aqlani, who was reportedly in his fifties, was shot dead while on his way to work early on Thursday. A gunman on a motorcycle reportedly opened fire at him and fled the scene.

Aqlani had been working for the US embassy in the Yemeni capital for nearly 20 years.

A US diplomat said Aqlani was in charge of coordinating a US and Yemeni probe into an attack last month on the embassy by protesters angry over an anti-Islam film that triggered a wave of deadly demonstrations across the Muslim world.

The US state department, in a statement released on Thursday, condemned the assassination, calling it "vicious act".

"We are coordinating closely with the Yemeni authorities to investigate this attack and to help bring those responsible to justice," the statement read.

The attack comes as Yemen's US-backed government is waging an offensive against al-Qaeda's branch in the country, taking back territory and cities in the south that the group seized last year.

The assassination resembles other attacks recently that have targeted Yemeni intelligence, military and security officials.

Those attacks are believed to be in retaliation for a military offensive by Yemen's US-backed government against Yemen-based Al-Qaida in the Arabian Peninsula (AQAP).