The United States had threatened to cut off the $1.3 billion in annual aid to Egypt's military, and the Egyptians had retaliated by warning that they would reconsider the U.S.-brokered treaty with Israel.

CAIRO — Egyptian officials said Wednesday that they would lift a travel ban barring seven Americans from leaving the country during the politically charged prosecution of U.S.-financed nonprofit groups in Cairo, apparently resolving a crisis that threatened to break the country’s 30-year alliance with the U.S.

A chartered plane was waiting at the airport in Cairo for the Americans, who include the son of Secretary of Transportation Ray LaHood, to carry them out of the country and beyond the reach of the Egyptian authorities.

The group had sought refuge in the U.S. Embassy.

The United States had threatened to cut off the $1.3 billion in annual aid to Egypt’s military, and the Egyptians had retaliated by warning that they would reconsider the U.S.-brokered treaty with Israel.

Unlimited Digital Access. $1 for 4 weeks.

For the defendants to leave the country, they will be required to pay large sums as bail — as high as $300,000 each, according to defense lawyers — and pledge to return for their trial. Lifting the travel ban does not resolve charges against the nonprofit groups or their Egyptian employees, nor does it erase the fear among the many advocacy groups that have come under the same investigation.

The case began with raids in December on 17 offices of U.S. and Egyptian nongovernmental organizations, on charges of illegally receiving foreign funds and failing to properly register with the government.

There are 16 Americans among the 43 defendants, but only seven are thought to be in Egypt.

At a time Egyptians are demanding a new independence for their judiciary after the ouster of President Hosni Mubarak, the Egyptian courts appear instead to have bent to political pressure.

By late Wednesday, there were signs of a political backlash, fueled in part by accusations from officials pressing the case that the U.S. groups were collaborating with spies to weaken Egypt for the benefit of the United States and Israel. The office of the Egyptian public prosecutor issued a statement distancing him from the decision.

“Could this be? I go out to eat some salad and come back to find that Egypt has knelt?” Reem Saad, director of the Middle East Center at the American University in Cairo, wrote in an online comment, recalling the prime minister’s vow that “Egypt will not kneel” to U.S. pressure.

All of the Americans under the travel ban work at groups known for their close ties to the congressional leadership: the National Democratic Institute and the International Republican Institute. The latter is directed by Sam LaHood, son of Ray LaHood.

The groups, which are chartered by Congress to promote democracy abroad and forbidden by law from seeking to influence election results, operated at some level in Egypt for several years although they faced heavy restrictions under Mubarak. Both groups were invited to observe the parliamentary elections last fall. They are best known for offering training programs for political campaigns and community organizing. Parties across the political spectrum — leftists, liberals, the mainstream Islamists of the Muslim Brotherhood and the ultraconservatives of the Salafi movement — have participated.

U.S. officials said Wednesday they would continue to fight the case in court. Freedom House, another U.S. group chartered to promote democracy, was also singled out in the investigation, but its U.S. employees were not caught by the travel ban.

The military leaders who took control of Egypt in February 2011 have pledged to transition to civilian rule by the end of June. On Wednesday, just before the news about the nonprofit case broke, officials said presidential elections would be held May 23 and 24, with a runoff to be held, if needed, June 16 and 17.

Material from The Washington Post and McClatchy Newspapers

is included in this report.