Assailants stabbed a Japanese diplomat in Yemen as the victim drove his car in the capital Sanaa, scene of a recent spate of attacks on foreigners, the embassy said.

The consul and second secretary at the embassy suffered five stab wounds in the Sunday morning attack as he drove through the neighbourhood of Hadda, an embassy spokesman said.

It was unclear if the attack was an attempt to kidnap the diplomat.

"He is ok now. He is in hospital," said the spokesman, who declined to disclose the name of the consul.

The spokesman said he had been driving ahead of the consul, but when he arrived at the embassy, he discovered that the consul was no longer following.

The diplomats had been driving without any guards, he added.

In late November, unidentified gunmen killed a Belarussian defence contractor and wounded another in an attack outside their hotel in Sanaa.