The verdict came just under two weeks after Egypt’s autocratic president, Abdel Fattah el-Sisi, visited Washington and was praised by President Trump, who said, “He’s done a fantastic job in a very difficult situation.”
Senior American officials told Ms. Hijazi’s relatives they had raised her case during Mr. Sisi’s visit, her brother Basel Hijazi said in a phone interview from Ireland. But they did not know if it had been addressed directly when the leaders met face to face.
“To be honest, we are just happy that she is out,” he said. “Everything that is going on internationally is irrelevant.”
Ms. Hijazi, who has dual American and Egyptian citizenship, was arrested in May 2014 with her husband, Mohamed Hassanein, and others at the Beladi Foundation, a nonprofit organization she founded to care for street children in Cairo.
Government prosecutors accused the couple of human trafficking and sexually abusing children in their care, potential charges that carried sentences ranging from five years’ hard labor to life in prison.
Ms. Hijazi and the other defendants had been held long beyond Egypt’s two-year limit for pretrial detention, in what Human Rights Watch called a “bizarre case.” Egyptian rights groups said the evidence against the couple lacked credibility.
While some children at the charity did show signs of sexual trauma, a forensic report concluded the abuse had occurred before 2014. The case came to be seen as part of the wider crackdown on civil society under Mr. Sisi.
Since coming to power in 2013, his increasingly authoritarian government has sought to weed out even the mildest forms of potential dissent. Part of that has involved demonizing aid groups with foreign funding that are portrayed in pro-state news media as unpatriotic provocateurs that seek to destabilize the country.
At the time of her arrest, Egyptian media outlets described Ms. Hijazi as an American agitator who had abused children and had paid them to throw stones at police and security officials on the street. Her family said the charges had no basis in reality.
As she had done many times over the years, Ms. Hijazi sat in a metal cage alongside her husband and other defendants on Sunday. The court hearings had been the only opportunity for the couple, who married one year before they were detained, to see each other.
At times, during earlier hearings, she read a book while waiting for her case to be heard. After the ruling on Sunday Ms. Hijazi was taken back to prison to be processed for release. Her lawyer, Taher Abu El-Nasr, said he expected Ms. Hijazi and the other defendants would be freed in a matter of days. Mr. Hassanein said the couple hoped to return to their work with street children in Cairo.
After the ruling on Sunday, Mr. Hassanein said the couple hoped to return to their work with street children in Cairo.
“We promised them that we could come back,” he said, speaking from the courtroom cage after his wife had left. “Children are wealth, and they were strong while we have been in prison. We want to go back to the streets.”
Still, he said, he was unsure if the government would allow them to resume that work.
While Ms. Hijazi’s case has dominated international attention of late, many similar prosecutions targeting lawyers, activists and journalists pass through the courts every day. Judges have sentenced hundreds of government opponents to lengthy prison sentences. Some have been sentenced to death, although executions are rare.
“Foreign funding is just a reason,” said Mohamed Zaree of the Cairo Institute for Human Rights Studies. “It’s a way of targeting anyone who has an independent voice, or is critical of the current regime.”
Among the foreigners detained in Egypt is Ibrahim Halawa, a 21-year-old Irish citizen who was arrested in 2013 at a Muslim Brotherhood protest during turbulent period when the security forces killed at least 800 people. Mr. Halawa’s family says that he is on a hunger strike to protest his continued detention in a mass trial involving about 500 other people.
The case has attracted significant attention in Ireland. A group of Irish parliamentarians visited Egypt to petition President Sisi for Mr. Halawa’s release in January, amid concerns that he has not received adequate treatment for a health condition. But the hearings have been subject to numerous delays.
Last month, the Irish government sent a doctor to Egypt to examine Mr. Halawa. A week later, Prime Minister Enda Kenny wrote to a letter Mr. Sisi pleading for his release on humanitarian grounds.