Sydney man Amer Khayat has been released from a notorious Beirut prison after being held in the facility for two years without conviction.

Key points: Mr Khayat's brothers Mahmoud and Khaled urged him to visit relatives in Beirut, giving him money for the ticket

Mr Khayat's brothers Mahmoud and Khaled urged him to visit relatives in Beirut, giving him money for the ticket Those brothers have since been convicted of attempting to hide bombs inside family gifts Amer Khayat was asked to take

Those brothers have since been convicted of attempting to hide bombs inside family gifts Amer Khayat was asked to take Another brother has been sentenced to death in Iraq for joining Islamic State

A military tribunal in Beirut this week ordered his release from the Roumieh prison in the hills outside Beirut.

Amer Khayat was scheduled to be freed on Thursday, but paperwork issues kept him behind bars for another night.

He is expected to soon return to Australia, where his teenage daughters live.

His Lebanese brother Fadi Khayat spent most of Thursday inside the prison trying to collect him.

"My heart is broken. Everybody says he's innocent — Lebanon, Australia, everybody — but he's still inside," he said.

Amer Khayat's brother Fadi Khayat says he is "heartbroken" his brother is not yet free. ( Supplied )

Amer Khayat had been estranged from two of his other brothers, Mahmoud and Khaled, in Sydney before they sought him out in mid-2017 and urged him to visit relatives in Beirut. They even gave him money for the ticket.

Courts in two countries have heard that Mahmoud and Khaled Khayat asked their brother to bring across gifts for family members.

Two juries in Australia have now determined that those gifts included bombs hidden in a meat grinder and a doll.

The brothers panicked and removed the explosives at check in.

The tribunal in Beirut held that Amer Khayat knew nothing of this and flew on an Etihad flight to Abu Dhabi and then on to Beirut.

The bomb plot was uncovered two weeks later, thanks in part to a tip-off from Israel, and the Sydney brothers were arrested.

Amer Khayat was detained shortly afterwards in Lebanon and even though the Australian Federal Police (AFP) said he had been duped by his brothers, who were Islamic State (IS) supporters, he has been held in Roumieh prison ever since.

Brothers convicted over bomb plot

Khaled Khayat was convicted over the bomb plot earlier this year. Mahmoud Khayat was convicted in Sydney late on Thursday. The ABC broke that news to Fadi Khayat at Roumieh prison.

"It's impossible that Mahmoud was guilty, it's impossible," Fadi Khayat said.

"None of my brothers are related to this. In my opinion, it's all because we've got a brother who was in Syria who was with ISIS, he is with ISIS, this is what is complicating things and making them appear guilty."

That brother is Tarek Khayat. He's a 46-year-old builder from Tripoli, in Lebanon, who fought for IS in Syria.

He says he was an accountant for an IS battalion based in Raqqa but he lost a leg in the battle for that city in 2017 and was eventually captured by US forces.

He has been sentenced to death by an Iraqi court. Courts in Australia and Lebanon heard that Tarek Khayat put IS commanders in touch with his Australian relatives.

No hard evidence has been presented that Amer Khayat knew anything about the bomb plot.

At a press conference in 2017 the AFP said Amer Khayat was used by his brothers, who were happy for him to die for their cause.

Eighteen months later the judge in charge of the Lebanese military tribunal was still urging Australia to provide him with information that supported that claim.

Amer Khayat had not fared well in jail in Lebanon. His court appearances had been marked by emotional outbursts, weeping and threats to kill himself.

At times, even the tribunal judges appeared confused why he was still in custody. They first ordered his release in March but for unknown reasons that ruling was never enforced.