While employees of American NGOs sat in Egyptian prisons, Secretary of State John Kerry quietly waived the law that would prevent the U.S. from sending the Egyptian military $1.3 billion worth of weapons this year.

Congress erupted in anger June 4, when Egyptian courts sentenced 43 NGO workers, including 16 Americans, to jail terms of up to five years for working in NGOs not registered with the government. Only one of those Americans, the National Democratic Institute’s Robert Becker, actually stayed in Egypt to await the verdict. He was given two years in prison. The other American organizations targeted included the International Republican Institute and Freedom House. All of those organizations had been operating in the open in Egypt for several years before the government raided their offices and forced them to flee the country in December 2011.

But what most in Congress didn’t know was that on May 10, Kerry had waived the restrictions lawmakers had put in place to make sure that U.S. military aid to Egypt wouldn’t continue unless Egypt made progress on its path to democracy, rule of law, and human rights. The State Department’s notification of Kerry’s move, which was never released to the public, was obtained by The Daily Beast.

The law that allows the State Department to give Egypt $1.3 billion each year in Foreign Military Financing (FMF) specifies that to get the money, the secretary of State must certify that Egypt is honoring its peace treaty with Israel as well as “supporting the transition to civilian government including holding free and fair elections; implementing policies to protect freedom of expression, association, and religion, and due process of law.”

Several members of Congress said this week that Egypt’s sentencing of American NGO workers, who were there to help Egypt build up its civil society and to promote democracy, flew in the face of that very law, meaning that Egypt should not get the money.

“The unjust convictions of Egyptian and American citizens by the Egyptian government, for nothing more than working to defend the fundamental rights of all Egyptians, is appalling and offensive to people of goodwill in Egypt and across the globe,” said Sen. Patrick Leahy (D-VT), who chairs the Senate Appropriations Committee’s state and foreign-ops subcommittee. “If Egypt continues on this repressive path, it will be increasingly difficult for the United States to support President Morsi’s government.”

“These politically motivated prosecutions of individuals doing nothing more than attempting to assist Egypt as it moves down the path toward democracy will only serve to undermine the progress that Egypt has made since 2011,” Sen. Marco Rubio (R-FL) said in a statement. “The court’s order that several of the organizations ... cease operations in Egypt also raises concerns about how the United States and other countries can continue to assist Egypt as it transitions from military rule, given that these are some of the premier international organizations that focus on democratic training, the building of civil society, and establishment of the rule of law.”

Reps. Frank Wolf (R-VA) and Gerry Connolly (D-VA) are circulating a letter in the House this week to Morsi threatening a cutoff of U.S. aid and asking him to step in and reverse the policy of prosecuting foreign NGO workers.

“In order for the U.S. government and the American people to have any confidence that the Egyptian government is undertaking a genuine transition to a democratic state, under civilian control, where the freedoms of assembly, association, religion and expression are guaranteed and rule of law is upheld, we must see a swift and satisfactory resolution to this case that takes into full account the concerns expressed in this letter, including revisions to the proposed NGO law,” reads the letter, a copy of which was obtained by The Daily Beast.

The lawmakers said that there was no way the Obama administration would be able to certify that Egypt was progressing toward democracy, given the jail sentences. They didn’t know that Kerry had already waived the law only weeks prior. Experts following the issue were shocked that Kerry’s team kept the decision a secret, unlike last year, when then–secretary of State Hillary Clinton also waived the law, but made sure to explain her actions and include a strong statement condemning the Egyptian government’s treatment of foreign NGOs.

This year Kerry didn’t say anything publicly and didn’t even tell many of the congressional offices that care about the issue, said Stephen McInerney, executive director of the Project on Middle East Democracy.

“It’s very alarming that no public statement was made by the secretary or the Department of State more broadly in conjunction with the waiving of these conditions,” he said. “The waiving of these conditions isn’t something that should be done lightly or quietly.”

In response to questions from The Daily Beast, State Department Bureau of Near Eastern Affairs spokesman Edgar Vasquez said Kerry waived the law based on “national-security interests,” because military assistance to Egypt includes programs that help stop trafficking of illegal goods, counterterrorism, and security in the region.

“To be sure, while Egypt has made some progress in its democratic transition, we recognize that much more work remains,” he said. “Concerns remain about government actions or support for laws that would restrict freedom of association, expression, and religion—universal rights which Egypt has international obligations to uphold—and its willingness to promote inclusive processes that respond to the aspirations of all Egyptians.”

Vasquez also pointed to State Department statements expressing “deep concern” over the guilty verdicts and sentences handed down by the Egyptian courts this week. “We called it for what it was: a politically motivated trial and a decision that runs contrary to the universal principle of freedom of association and is incompatible with the transition to democracy,” he said.

Steven Cook, a fellow at the Council on Foreign Relations, said the Obama administration is prioritizing its relationship with the Egyptian military right now over the drive to promote democracy and human rights there.

“The NGO stuff is horrific, but we need to work with the Egyptian armed forces,” he said. “The administration’s clearly made the judgment that now is not the time to start messing with the FMF, that you need to reassure the Egyptian military, which shares basic interests with the U.S.”

But the Egyptian military was involved in the crackdown on the NGOs, and the issues are linked, Cook said. The Supreme Council of the Armed Forces was in power when the raids happened, and the leader at the time, Field Marshal Mohamed Tantawi, was known to be close to Egyptian Minister of International Cooperation Fayza Abul Naga, a holdover from the Mubarak era who played a lead role in the raids and the prosecutions.

“Foreign funding of NGOs in Egypt is something that drives the Egyptian military command crazy,” said Cook. “They believe it’s a national-security threat to Egypt and that’s how they are complicit in this. They want to shut this all down.”

Correction: Robert Becker works for the National Democratic Institute, not the International Republican Institute.