Two Canadians released from an Egyptian prison after being held without charges for seven weeks were barred from flying out of the country on Sunday, Cairo airport officials said.

John Greyson, a Toronto filmmaker and York University professor, and Tarek Loubani, a physician from London, Ontario, had checked in for a flight to Frankfurt, Germany, but were prevented from boarding the plane after their names appeared on a "stop-list" issued by prosecutors, the airport officials said.

'There were so many false starts and so many of these psychological games. - Justin Podur, friend and spokesperson for the pair, comments on their release

The pair retrieved their luggage and were free to leave the airport, the officials said, speaking on condition of anonymity because they were not authorized to brief reporters.

Confirmation that the pair were granted their freedom came from Minister of State for Foreign Affairs Lynne Yelich late Saturday.

Greyson's sister, Cecilia, told The Associated Press that Canadian consular officials were dealing with what she called "red tape" so they could begin their trip back to Canada.

"Until they are safely back in Canada we are just going to be a little bit on edge," she said. "We've had contact with them throughout the day today. We're relieved they are out of prison. We're immensely encouraged by that."

She said the two are in a safe and secure location waiting patiently to get out. They have been in regular contact via phone and email, she said.

Earlier on Sunday, Cecilia said the pair were completely surprised when a guard swung open their cell door and led them to freedom.

"They just got a knock on the cell door and they were just sort of shuffled out of the cell," she said her brother told her in a late-night telephone call.

"He actually thought they were changing cells or going to a different prison. So he was as surprised as anyone else about their release."

'Roller-coaster ride'

Cecilia says she spoke with her brother for about 10 minutes after his release.

"I didn't even realize he was going to call. I just picked up the phone and it was his voice," she told CBC News Sunday afternoon. "They were in good shape and they were really happy. I could tell John and Tarek were both excited and couldn't wait to get home."

Eman Loubani, Tarek's sister, told CBC News that she had a "five-second conversation" with her brother after the release and said "he sounded in good spirits."

"All that matters is they are safe and sound and they will heal," she said.

Loubani's family felt a "debt of gratitude" toward consular staff in Egypt who worked "tirelessly," she said.

Justin Podur, the pair's friend and spokesman in Canada, said he didn't believe the men would be freed even though some of those around him felt it might be imminent.

"There were so many false starts and so many of these psychological games," said Podur.

Cecilia called the experience a "roller-coaster ride."

"We just never knew what was going around the corner," she said. "It was really hard to keep our positive energy, our momentum going."

Ottawa aware of airport red tape

Adria Minsky, a spokeswoman for Yelich, said in an emailed statement to The Associated Press that they were "aware of these reports" that the Canadians were not allowed on their flight and said "Canadian embassy officials continue to provide consular assistance to facilitate their departure from Egypt."

"We look forward to seeing these two Canadians return home shortly," Minsky said.

Greyson, a Toronto filmmaker and professor at York University, and Loubani, an emergency ward doctor from London, Ont., were arrested Aug. 16 during violent anti-government demonstrations in Cairo.

"I look forward to Dr. Loubani and Mr. Greyson being reunited with their families and friends, who have shown tremendous strength during this difficult time," Yelich said in a statement after the pair's release.

Prime Minister Stephen Harper also welcomed the news of their release, issuing a statement from the Malaysian capital of Kuala Lumpur where he was holding trade talks before heading to Bali for an APEC summit.

"The government of Canada has obviously been pushing for that and welcomes this decision by the government of Egypt and we look forward to seeing these two Canadian citizens return home in the not too distant future."

Greyson and Loubani were released Sunday morning — Cairo time.

No charges laid

Before their arrest, Greyson and Loubani said they were planning to stay in Cairo only briefly on their way to Gaza.

They issued a statement from prison last month indicating they had decided to check out protests that were close to their hotel and saw at least 50 protesters killed. Loubani stopped to treat some injured protesters and Greyson filmed the carnage.

Their statement said that after leaving the scene of the protests they asked police for directions and were stopped and beaten and taken into custody.

Subsequently Egyptian prosecutors accused them of "participating with members of the Muslim Brotherhood" in an attack on a police station, but never laid any charges.

The two Canadians said they spent most of their time crammed with other inmates in a filthy, cockroach-infested prison cell as they awaited word on their fate.

The pair staged a 16-day hunger strike to try to pressure Egyptian officials to release them, but started eating food again last week.

Last week, Foreign Affairs Minister John Baird said the Canadian government is doing "absolutely everything it can" to secure the pair's release.

Baird spoke with his Egyptian counterpart for an hour late last month lobbying on the two men's behalf.