The United States has decided to deny Egypt $95.7m in aid and to delay a further $195m because of its failure to make progress on respecting human rights and democratic norms, two sources familiar with the matter said on Tuesday.

The decision reflects a US desire to continue security cooperation as well as frustration with Cairo's stance on civil liberties, notably a new law that regulates non-governmental organisations that is widely seen as part of a growing crackdown on dissent, said the sources, who spoke to Reuters on condition of anonymity.

US officials were especially unhappy that Egyptian President Abdel Fattah el-Sisi in May allowed the NGO law to go into effect.

Human rights groups and activists have said that it effectively bans their work and makes it harder for charities to operate.

READ MORE: Why is Egypt's new NGO law controversial?

Egyptian officials had assured US officials earlier this year that the law, which restricts NGO activity to developmental and social work and introduces jail terms of up to five years for non-compliance, would not go through, the sources said.

Spokespeople for the White House and the Department of State were not immediately available for comment.

Al Jazeera's Heidi Zhou-Castro, reporting from Washington, DC, said the news was surprising, given that Sisi had visited the US in April and been praised by Trump, who did not publicly raise the issue of human rights with the Egyptian president.

"It shows that the US is walking a fine line in hoping to maintain security cooperation with Egypt - which is a key ally in the Middle East - while at the same time expressing its frustration with Cairo's stance on these civil liberty issues," she said.

'Reprogramming' the funds

Egypt is an important Middle East partner for the US because of its control of the Suez Canal and its border with Israel.

The sources said the administration had decided to "reprogramme" $65.7m in fiscal year 2017 Foreign Military Financing funds (FMF) and $30m in fiscal year 2016 Economic Support Fund (ESF) funds.

"Reprogramming" means these funds would be used for other purposes and would not go to Egypt.

The administration made a separate decision to withhold $195m in fiscal year 2016 Foreign Military Financing funds which, had it not acted, would have expired and ceased to be available at the end of the current fiscal year on September 30.

The second decision also illustrated the administration's ambivalence towards Egypt.

Under US law, the administration is required to withhold 15 percent, or $195m, of the $1.3bn it gives Egypt annually in FMF funds unless it can certify that Cairo is making progress on advancing human rights and democracy. However, the administration can issue a national security waiver that allows the funds to go through.

This year, the administration again decided it could not certify Egyptian progress on rights, and it chose to issue the national security waiver but it is still going to withhold the $195m.

That money will now go into an account where it will be held pending Egyptian improvement on human rights and democracy. This means that Egypt could eventually get the money if its record on democracy and civil liberties improves.

READ MORE: Uighurs arrested in Egypt face unknown fate

"Strengthened security cooperation with Egypt is important to US national security," said one source, adding that US Secretary of State Rex Tillerson felt "it was in the interests of the US to exercise the waiver".

"We remain concerned about Egypt’s lack of progress in key areas, including human rights and the new NGO law," the source said.

Egyptian rights activists have said they face the worst crackdown in their history under Sisi, accusing him of erasing freedoms won in the 2011 Arab Spring uprising that ended Hosni Mubarak's 30-year rule.

Egyptian legislators have said the NGO law was needed to protect national security.

The Egyptian government has long accused human rights groups of taking foreign funds to sow chaos, and several are facing investigation over their funding.