A German man who headbutted a Commonwealth public official while he was being arrested for smoking on a plane mid-flight will not be sent to jail.

A German man who smoked in an aeroplane toilet, assaulted a crew member and threatened to open a door mid-flight on his way to Australia has escaped jail.

But he’ll have to pay compensation to the airline and the crew member he injured.

Mathias Jorg, 55, was restrained on the Emirates Singapore-Brisbane flight for two hours after he became violent towards crew who tried to stop him smoking.

Jorg was sentenced for his mid-air outburst in the Brisbane Magistrates Court on Friday.

The German national was charged with smoking in an aircraft toilet, assaulting a cabin crew member and interfering with a cabin crew member.

He was also charged with obstructing a Commonwealth public official, who he attempted to headbutt during his arrest at Brisbane Airport.

The court heard Jorg was a heavy smoker, who told passengers onboard the January 1 flight that small spaces made him anxious and that he had had trouble sleeping in the lead-up to flight.

Jorg had consumed five small bottles of red wine, including four on the Singapore-Brisbane leg of flight.

But Jorg’s duty lawyer, Alisha Radford, said he was not intoxicated and his actions were “out of character”.

Jorg was a risk to passengers as he intended to open the door of the plane, the court was told.

Commonwealth prosecutor Anita Sharma said while a door couldn’t be opened mid-flight, interference with it could depressurise the cabin.

She said up to seven people attempted to restrain Jorg, who pushed one crew member and caused a shoulder injury to another.

Ms Radford said Jorg suffered cuts and bruises to his face during the struggle and tendered photographs of his injuries to the court.

Magistrate Tina Privitera took Jorg’s injuries into account when sentencing him.

She said the incident was out of character for Jorg, who had no criminal history, but questioned why he boarded the plane in the first place.

“One wonders why, as an addicted smoker suffering anxiety and being anxious about being in small spaces, that you would ever get on an aircraft,” she said.

Jorg, who had court proceedings relayed to him by a translator, was sentenced to 12 months’ imprisonment, wholly suspended subject to a three-year, $1000 good behaviour bond.

He was fined $200 for smoking in the aircraft toilet and ordered to pay Emirates $1449 compensation for medical costs.

He was also ordered to pay $1115.22 to the crew member he assaulted to cover loss of wages and a long-haul flight allowance.

Jorg travelled to Australia to visit his two children, aged 15 and 17, who live on the Sunshine Coast with his ex-wife.

He intends to stay in Australia until his visa expires on February 2.