The trial of Zaur Veyisov was conducted behind closed doors.
Veyisov was serving in Azerbaijan's northwestern Tovuz region when he was kidnapped by Armenian forces last year. Prosecutors say Veyisov then agreed to give the Armenian military valuable information in return for his release. He was arrested in June 2005.
Azerbaijan and Armenia remain formally at war over the disputed territory of Nagorno-Karabakh. The predominantly Armenian enclave forcibly seceded from Soviet Azerbaijan in 1988, triggering a war that killed an estimated 35,000 and drove hundreds of thousands Azeris and Kurds from their homes.