Two Ontario men who were barred from leaving Egypt after they were detained for nearly two months are finally home.

Filmmaker and professor John Greyson of Toronto and Dr. Tarek Loubani of London, Ont., arrived in Toronto at Pearson International Airport shortly before 7 p.m. Friday night after boarding a Frankfurt-bound plane in Cairo earlier in the day.

Speaking with media at the airport, the pair expressed their delight to be home.

“We’re home because of the work of many thousands of people, from all walks of life, from all stripes of the political spectrum,” Loubani read from a prepared statement. “They were outraged at our arbitrary arrest and spoke out for our release. Our deepest gratitude goes out to all of them. Your hard work mattered.”

Family members, friends, colleagues, students and their respective universities were among those thanked by the pair.

“We were detained without charges for nearly two months, along with 600 others, all of us swept up in a brutal roundup on Aug. 16,” Greyson detailed.

The pair were beaten and held in a cramped cell overrun with cockroaches, Greyson said.

Speaking about the choices and decisions made in Egypt, Loubani acknowledged the men had made errors in judgement.

“In hindsight, it’s really obvious we made mistakes,” he said.

As part of their statement, the men told media in attendance that they would answer questions tomorrow.

“Right now our families are waiting for us impatiently downtown,” Greyson said.

Last Saturday, amid mounting pressure for their release, Canadian officials announced that the men had been freed after spending 50 days in custody without being charged.

The next day, the men tried to board a plane for Frankfurt but they were barred from leaving Egypt because their names were on a “stop list” issued by prosecutors, airport officials told The Associated Press.

Greyson and Loubani were free to leave the airport and they had been staying in Cairo in a safe location with consular officials, Greyson's sister Cecilia said previously. They had been in contact with relatives and they released a one-minute YouTube video Wednesday thanking supporters.

The men said they were arrested at a police checkpoint in Cairo in mid-August amid violent clashes involving supporters of ousted president Mohammed Morsi and Egyptian security forces.

Greyson and Loubani said they were detained as they asked for directions back to their hotel after treating wounded pro-Morsi demonstrators at a field hospital in Ramses Square.

The men said they were in Cairo as they attempted to travel to a hospital in Gaza, where Loubani teaches emergency medicine to staff and where Greyson was invited to observe Loubani’s work and film.

After their arrest, the men released a statement from prison saying they were beaten, stripped, shaved bald and placed in a filthy, cockroach-infested cell where they and more than 30 other prisoners were forced to sleep on the concrete floor and share a single tap of water.

At one point, the men staged a 16-day hunger strike to try to convince Egyptian officials to release them.

After their unexpected release, their lawyer said prosecutors withdrew accusations that the men participated in illegal protests or resisted authorities during arrest.

In a written statement issued Friday, Lynne Yelich, a junior minister for foreign and consular affairs, thanked the Egyptian government, Canada’s ambassador to Egypt and consular officials who helped Greyson, Loubani and their families.

“Canada joins the families of Dr. Loubani and Mr. Greyson in welcoming their return to Canada,” Yelich said.

@ChrisKitching is on Twitter. For instant breaking news, follow @CP24 on Twitter.