Anna Lindstedt, who was envoy to Beijing between 2016 and 2019, was accused of brokering and attending an unauthorised meeting in January last year to get a Chinese-Swedish publisher freed from custody in China.
The case of dissident Gui Minhai – a five-year-saga beginning when he vanished while on holiday in Thailand – has strained relations between Sweden and China.
The meeting in question was between the publisher's daughter Angela Gui and businessmen with alleged ties to Beijing.
Angela Gui wrote on her blog shortly afterwards that the businessmen claimed they could help to get her father released but only if she stopped talking to the media, later describing the tone of the meeting as “threatening”.
A day after the blog post was published, the Swedish intelligence service confirmed it had opened an investigation into the matter.
Lindstedt faced a charge of “arbitrariness during negotiations with a foreign power” which carries a maximum jail term of two years, although the prosecutor has asked for a suspended sentence.
It was the first time since the 18th century that an ambassador has faced trial in Sweden.
The court said for someone to be convicted of the crime they would have had to falsely pose as a representative of Sweden and to engage in actual negotiations with a representative of a foreign power.
Judge Anna Flodin said the court did not believe it had been proven that Lindstedt entered into any negotiation with someone representing the Chinese state.
“The court also found that if she had, she would have been within her right as Sweden's ambassador to China,” Flodin told a press conference.
During the trial, Lindstedt denied the charges and said she had been “unfailingly loyal” to Sweden throughout her 30-year career, telling the court: “It is unreal, not to say Kafkaesque to stand accused of crimes against national security.”
Gui Minhai, known for publishing gossipy titles about Chinese political leaders in Hong Kong, disappeared while on holiday in 2015 and resurfaced in China, where he served two years in prison.
A few months after his October 2017 release he was again arrested, this time while on a train to Beijing with Swedish diplomats.
He was hit with a 10-year jail term earlier this year on charges of illegally providing intelligence abroad.
China insists the matter is an internal affair and has been stung by criticism from Sweden.
The Swedish foreign ministry removed Lindstedt from her post but she has stayed on at the ministry without an assignment.
The ministry has maintained it had no prior knowledge of the meeting, saying Lindstedt acted on her own initiative.
Ministry representatives told the court that Lindstedt had been instructed to handle Gui Minhai's case through Stockholm.
In turn, Lindstedt maintained she had not received those instructions and that she had told her superiors of the meeting, according to public broadcaster SVT.
Fellow diplomats had rallied to Lindstedt's defence, arguing that she had acted well within her remit.
“I don't think that the ambassador has committed a crime, absolutely not,” former envoy Sven Hirdman told AFP on the first day of the trial.
“She tried to do what she should do as a Swedish ambassador – to solve a complicated consular case between Sweden and China.”
Article by AFP's Helene Dauschy and Johannes Ledel