WASHINGTON — For two years, the Trump administration has unabashedly slashed U.S. aid to the Palestinians. Now, amid signs it may finally roll out its long-awaited Middle East peace plan, the administration is scrambling to save what little remaining Palestinian assistance it provides.

The striking turnabout is the result of the belated realization that an obscure new law will likely force the U.S. to terminate all aid to the Palestinian Authority, including security assistance supported by Israel, by the end of January. Eliminating such aid, which totaled $61 million this year even as other assistance was being cut, would deal a blow to Palestinian-Israeli security cooperation that both sides value. The law would also require the Jerusalem offices of the U.S. Agency for International Development to close.

To avert that possibility and remove a potentially lethal complication to the promised peace plan, the administration is rushing to find a solution. It will dispatch Army Lt. Gen. Eric Wendt, who serves as U.S. security coordinator for Israel and the Palestinian Authority, to Congress in the coming days to urge lawmakers to come up with a fix to the law, known as the Anti-Terrorism Clarification Act of 2018, to allow the aid to continue.

Congressional aides said they expect Wendt and other officials to start making the case next week in the hope of securing a fix in the short time it has left in session this year. The House and Senate are set to adjourn on Dec. 13 and Dec. 14, respectively. If that fails, officials said they expect to redouble their efforts when the new Congress convenes in January.

The State Department, to whom Wendt reports, declined to comment on the effort but acknowledged the problem.

"We are studying the potential impact of ATCA," the department said in an emailed response to queries about the matter from The Associated Press. "At this time, no changes have been made to U.S. security assistance to the Palestinian Authority or other ongoing programming."

ATCA made its way through Congress and was signed by President Donald Trump in early October with little fanfare. The White House perfunctorily announced the Oct. 3 signing in a two-paragraph statement that said only that the law "allows certain assets that are seized or frozen by the United States to be used to satisfy judgments against a terrorist party for claims based on an act of terrorism."

But for the Palestinians and potentially others the law has more severe consequences. Under ATCA, the Palestinian Authority would be disqualified from receiving any U.S. aid unless it agrees to pay court judgments of sometimes up to hundreds of millions of dollars on behalf of American victims of Palestinian attacks. The deadline for accepting that condition is 120 days from Trump's signing, or January 31, 2019.

The Palestinians say they will do no such thing and accuse the administration of acting in bad faith. They note that the administration has already cut hundreds of millions of dollars in aid for health, education, development and good governance programs, closed the PLO office in Washington, recognized Jerusalem as Israel's capital over their fervent objections and moved the U.S. embassy there from Tel Aviv. In addition, the administration has downgraded its main diplomatic mission to the Palestinians by folding it into the embassy to Israel.

"Palestinian-U.S. security cooperation is based on the fact that we are against terrorism and fighting it," said Nabil Shaath, Palestinian President Mahmoud Abbas's adviser for international affairs. "Therefore, nobody can say that such an act can be implemented on us."

In this case, however, the administration is siding with the Palestinians in seeking a way around the requirements of the law. So are some pro-Israel members of Congress who have supported the administration's policy toward Israel and the Palestinians in the past, according to aides.

Legal experts who have studied ATCA say the easiest fix would be to have Congress amend the law to allow the president or secretary of state to waive the aid cut-off on national security grounds.

"A waiver or some sort of work around is going to be very important for this administration or any future administration that wants to pursue Israeli-Palestinian peace," said Scott Anderson, an international lawyer and former American diplomat who is now a fellow at The Brookings Institution in Washington. "Cutting off the ability to supply that kind of security assistance would be short-sighted to say the least."