Lebanese authorities released Friday a Lebanese-Australian man who was detained for more than two years over an alleged plot to bring down a passenger plane bound for the United Arab Emirates from Sydney, after a military court said he was innocent in the case.

Australian-Lebanese dual citizen Amer Khayat was held in Lebanon since the summer of 2017 days after Australian authorities foiled an alleged plot to down an Etihad flight bound for Abu Dhabi the same year.

Around noon on Friday, Khayat walked out of Roumieh prison near Beirut waving his Australian passport before he was met by his brother, Fadi. Wearing a white T-shirt and black trousers, he looked angry and criticized Lebanon for being put in jail.

Australian-Lebanese dual citizen Amer Khayyat shows his Australian passport to journalists, after his release from prison in Roumieh, east of Beirut, Lebanon, Friday, Sept. 20, 2019. Lebanese authorities have released the Lebanese-Australian who had been detained in Lebanon for more than two years after he was found innocent in an alleged plot to bring down a passenger plane bound for the United Arab Emirates from Sydney. (AP PhotoBilal Hussein)

Australian-Lebanese dual citizen Amer Khayyat shows his Australian passport to journalists, after his release from prison in Roumieh, east of Beirut, Lebanon, Friday, Sept. 20, 2019. Lebanese authorities have released the Lebanese-Australian who had been detained in Lebanon for more than two years after he was found innocent in an alleged plot to bring down a passenger plane bound for the United Arab Emirates from Sydney. (AP PhotoBilal Hussein)

"I want to go back home to Australia. Australia is my country not Lebanon," Khayat yelled, saying that after spending nearly three years in jail he was told he is innocent. Khayat added that he was innocent since he first came to Lebanon.

Two of Khayat's brothers are on trial in Australia for the plot. But Australian authorities believed Amer Khayat was an unwitting participant in the failed attack.

On Wednesday, Lebanon's Military Tribunal acquitted Amer Khayat and sentenced in absentia his three brothers Khaled, Mahmoud and Tarek to life in prison at hard labor. Khaled and Mahmoud Khayat are in Australia where they were found guilty in the plot while Tarek Khayat is believed to be in Syria fighting with the Islamic State group.

Australian-Lebanese dual citizen Amer Khayyat, left, kisses his brother Fadi, after his release from prison in Roumieh, east of Beirut, Lebanon, Friday, Sept. 20, 2019. Lebanese authorities have released the Lebanese-Australian who had been detained in Lebanon for more than two years after he was found innocent in an alleged plot to bring down a passenger plane bound for the United Arab Emirates from Sydney. (AP PhotoBilal Hussein)

Australian-Lebanese dual citizen Amer Khayyat, left, kisses his brother Fadi, after his release from prison in Roumieh, east of Beirut, Lebanon, Friday, Sept. 20, 2019. Lebanese authorities have released the Lebanese-Australian who had been detained in Lebanon for more than two years after he was found innocent in an alleged plot to bring down a passenger plane bound for the United Arab Emirates from Sydney. (AP PhotoBilal Hussein)

Lebanon's military prosecutors had earlier charged the brothers with joining IS and preparing to blow up the passenger plane.

The plan involved detonating a bomb concealed in a meat grinder on a flight from Sydney on July 15, 2017, to the United Arab Emirates capital Abu Dhabi, but it was abandoned when a bag with the bomb inside was too heavy to be taken aboard as carry-on luggage.

Australian-Lebanese dual citizen Amer Khayyat shows his Australian passport to journalists, after his release from prison in Roumieh, east of Beirut, Lebanon, Friday, Sept. 20, 2019. Lebanese authorities have released the Lebanese-Australian who had been detained in Lebanon for more than two years after he was found innocent in an alleged plot to bring down a passenger plane bound for the United Arab Emirates from Sydney. (AP PhotoBilal Hussein)

Australian-Lebanese dual citizen Amer Khayyat shows his Australian passport to journalists, after his release from prison in Roumieh, east of Beirut, Lebanon, Friday, Sept. 20, 2019. Lebanese authorities have released the Lebanese-Australian who had been detained in Lebanon for more than two years after he was found innocent in an alleged plot to bring down a passenger plane bound for the United Arab Emirates from Sydney. (AP PhotoBilal Hussein)