The 34-year-old man, said to be suffering from a serious mental disorder, went to Moscow in November last year in a bid to hand over secrets obtained in his work as a computer consultant to the Swedish army, the court said in a statement announcing the verdict.

He had contacted the FSB and GRU Russian intelligence services offering the secrets in return for Russian nationality and special protection, the statement said.

According to prosecutors, the man used artificial intelligence to create a document titled "Petition for Military Protection via GRU Pathway" in which he gave his reasons for seeking protection.

The man, named only as R.T., denied the charges during the three-day trial and held mostly behind closed doors.

The defendant is also under investigation for conspiracy to commit murder, according to the SAPO Swedish intelligence service which has stated that Russia is Sweden's main military and intelligence threat.