(Adds prosecutor comment, court documents, background)
STOCKHOLM, Oct 4 (Reuters) - An employee of Canadian aircraft and train maker Bombardier facing bribery charges in Sweden is to be released immediately from custody, a court document showed on Wednesday.
A 37-year-old Russian man was arrested in March on suspicion that he and several others had bribed an Azerbaijani official to secure a $340 million contract.
The Stockholm district court has ordered the man - who has denied the allegations - be released immediately "as there are no grounds for keeping him arrested".
The prosecutor had demanded a sentence of five years in prison. The trial has ended and sentencing is set for Oct. 11.
"Our interpretation is that he will be completely acquitted, or that he is guilty only of a minor part of the accusation and, if so, has already served his time," the employee's lawyer Cristina Bergner told Reuters.
In their March statement, Swedish prosecutors alleged Bombardier had won the tender after competitors that had offered better prices were disqualified by Azerbaijan's rail authority.
Bergner has previously said the Russian man was too junior within the company to collude with Azerbaijani officials about winning the contract.
Prosecutor Thomas Forsberg said a preliminary investigation into higher-ranking employees at Bombardier was going ahead, but declined further comment until the verdict is announced.
The Canadian firm said in August it took the allegations very seriously and it supported an investigation. (Reporting by Johan Ahlander, Helena Soderpalm and Olof Swahnberg; Editing by Mark Potter and Alexander Smith)