Dominic Bird (right) is free after an appeal against his acquittal was rejected by a Malaysian court.

AAP: Joshua Paul

An Australian man has escaped the death penalty for a second time after a Malaysian court rejected an appeal by prosecutors against his acquittal on drug charges.

Dominic Bird, from Perth, was arrested in March 2012 at a cafe near his apartment in Kuala Lumpur and accused of trying to supply an undercover police officer with 167 grams of methamphetamine - an amount that carries a mandatory death sentence.

He was acquitted after the case against the 34-year-old fell apart amid allegations of corruption on the part of the prosecution's star witness - Inspector Luther Nurjib - and Mr Bird was set free in September 2013.

Mr Bird was just five minutes from freedom and waiting to board a flight back to Australia when he was re-arrested at the boarding gate of Kuala Lumpur's international airport following an 11th-hour appeal by prosecutors.

But the Malaysian Court of Appeal in Putrajaya on Wednesday rejected the prosecution's bid to have the High Court's decision overturned, with Mr Bird again set free, subsequently beating the death penalty for a second time.

Mr Bird's lawyer Muhammad Shafee Abdullah said it was likely his client would be allowed to return home to Perth.

"I suspect he would be, because the authorities would have to consider the fact that there are now federal judgments from the High Court as well as the Court of Appeal that confirms his innocence," he told the ABC.

"I think they would allow him to leave the country."

Dominic Bird always confident

Mr Bird said he was always confident the appeal would be rejected.

"We had a strong case from the start," he said outside court.

"I didn't have a single grain of doubt that this outcome would be what it is right now."

Mr Bird's father Clayton, who was with his son in court, expressed relief at the court's verdict.

"I am really happy that we have come to an end and we got a good result and that he is free," he said.

Mr Abdullah said it could take a couple of days for Mr Bird's visa to be endorsed, which was necessary before he could leave the country.

"I expect it to be no longer than two to three days at the most," he said.

Prosecutor Awang Armadajaya said he would consult with his superiors at the Attorney-General's office about whether or not to continue to pursue Mr Bird.

The prosecution had 14 days to appeal, and Mr Awang said he may seek an injunction to prevent Mr Bird from leaving Malaysia while the Attorney-General's office considers its options.

In earlier hearings, Mr Abdullah had argued that the arrest at the boarding gate at Malaysia's international airport was unconstitutional on the grounds his client had been declared by the Kuala Lumpur High Court to be a free man.

But Court of Appeal Justice Azahar Mohamed subsequently rejected that argument and ruled the arrest was lawful, and that the appeal was simply a continuation of the trial.

Mr Bird, having already spent more than 18 months behind bars, was granted bail pending the outcome of the appeal.

The former truck driver was initially arrested in March 2012 at a cafe near his flat in Kuala Lumpur after allegedly supplying methamphetamine to an undercover officer.

Possession of more than 50 grams of the drug carries a mandatory death penalty in Malaysia.

Mr Bird always maintained he was set up by Inspector Nurjib, who last year was found guilty of contempt of court and fined RM2000 ($AU665) after it emerged he had threatened and attempted to bribe a witness in the case.