CAIRO — After three years in detention, the Egyptian-American aid worker Aya Hijazi was cleared of child abuse and human trafficking charges in Cairo on Sunday, abruptly ending a high-profile case that had become an international symbol of Egypt’s harsh crackdown on aid groups.

A courtroom in downtown Cairo erupted in cheers after the judge dropped all charges against Ms. Hijazi, her Egyptian husband and all six other defendants in what human rights groups called a weak case driven by defective evidence.

Ms. Hijazi, 30, a graduate of George Mason University in Virginia, embraced her husband after the verdict was announced, then smiled broadly as she was led from a metal cage to a waiting police vehicle to be processed for release.

Her mother, Najla Hosni, embraced her outside the court building. “I told Aya that she graduated from their trial with honor,” Ms. Hosni said afterward.