Egypt's military-backed authorities have released two Canadians held without charge for seven weeks, the Canadian government says.
Dr Tarek Loubani and film-maker John Greyson were accused of taking part in deadly political clashes in Cairo.
The men insisted Dr Loubani was just helping injured protesters, while Mr Greyson filmed the violence.
The releases come hours before fresh demonstrations are expected in central Cairo.
Supporters and opponents of ousted President Mohammed Morsi have said they will take to the streets
No details were immediately available about the reasons for the release of the Canadians. They were detained on the streets of Cairo during the night of a huge crackdown in which hundreds of Muslim Brotherhood supporters were killed and arrested.
Dr Loubani's brother Mohammed told the Toronto Star that the pair had not known they were about to be freed.
"They just came to their cell and said, 'Come with us,' " Mohammed Loubani said.
"They had no idea what was happening until they arrived at the police station. They were stunned."
The pair spent three weeks on hunger strike to protest their innocence.
They also said they were treated with brutality while in prison.
Canadian Prime Minister Stephen Harper "welcomes this decision by the government of Egypt" to set the pair free, AFP news agency reported.
"We look forward to seeing these two Canadian citizens return home in the not-too-distant future," he told reporters in the Malaysian capital, Kuala Lumpur.
Tahrir Square is once again likely to be the centre point of Egypt's crisis, says the BBC's Quentin Somerville in Cairo.
Hundreds of thousands of people are expected to gather to mark the 40th anniversary of the 1973 Arab-Israeli war.
There will be a grand display of military hardware in Tahrir Square and across the capital.
Extra security including metal detectors and armed troops have been placed around the square in anticipation of protests by Morsi supporters.
They view the military-backed government as illegitimate.
The interior ministry has said it will deal firmly with any lawlessness.
Four people were killed on Friday as Morsi supporters clashed with opponents and security forces.
Hundreds of Islamist protesters have died in violence since the Egyptian military deposed Mr Morsi in July, 13 months after he was elected as president.
He and other senior Brotherhood figures have been imprisoned and face trial.
The authorities are moving to seize the movement's assets after its activities were banned as part of a crackdown.
However, Brotherhood supporters have continued to take to the streets to protest - albeit in smaller numbers than before.