Al-Qaeda in the Arabian Peninsula, a franchise of the global jihadist network, is active in Yemen and is seen by Washington as its most dangerous branch.
The suspect, Abdullah Saad Ghazi al-Rimi, was found guilty of "belonging to an armed Al-Qaeda group" and involvement in "criminal acts in 2012 against officers and members of the security and armed forces" and security installations in Sanaa, the official Saba news agency said.
The judiciary in Yemen has stepped up trials of Al-Qaeda suspects in recent months, handing 10 alleged members of the network sentences ranging from two to seven years in prison after convicting them of taking part in attacks.
The militants were driven back in June 2012 and the group has been weakened by US drone strikes.
But AQAP remains active in southern and eastern Yemen, and regularly carries out hit-and-run attacks on security forces.