WASHINGTON (Reuters) - Democratic and Republican leaders of the U.S. House of Representatives reached an agreement on Tuesday that would extend a divisive set of government surveillance tools, a major boost for efforts to reauthorize the program before it expires on Sunday.

Democratic House Speaker Nancy Pelosi and Republican leader Kevin McCarthy, as well as the leaders of the House Intelligence and Judiciary Committees, reached an agreement to reauthorize three expiring provisions of the Foreign Intelligence Surveillance Act, known as FISA.

Among other changes, the agreement would narrow the type of information collected, prevent it from being held for more than five years and make the program less secretive.

Pelosi said the deal “strikes the balance between protecting Americans’ security and their civil liberties.”

While the deal is a major step toward renewing the program, its fate was not immediately clear even if it is passed by the Democratic-led House in a vote that could come as early as Wednesday. The Republican-led U.S. Senate was not involved in the negotiations.

Aides to Republican President Donald Trump, who would have to sign any legislation into law, did not immediately respond to a request for comment.

However, Trump’s attorney general, William Barr, was involved in negotiations for the agreement. Some Senate Republicans told reporters that, while they had not yet had a chance to closely review the legislation, they were likely to back a measure supported by Barr.

The domestic surveillance rules had become a flashpoint between Democrats and Republicans because Trump has pushed to change them in the aftermath of the investigation of Russian efforts to interfere in U.S. elections.

Some of Trump’s fellow Republicans have been especially skeptical of the program because of an FBI FISA warrant for Carter Page, a former Trump campaign adviser.

Privacy advocates, including liberal Democrats and libertarian-leaning Republicans, are fiercely critical of any surveillance program.

The American Civil Liberties Union called the deal a half-measure jammed through with little debate. “With only minimal improvements over current law, the reforms in this backroom deal fall far short of what is needed to protect our privacy rights,” said Christopher Anders, ACLU deputy political director.

Republican Senator Rand Paul said he had not read the House agreement but did not expect it to measure up to his expectations. “It’s probably tepid and not enough. It’ll probably be fake reform, not real reform,” he said.

Paul said Americans should not be subject to secret warrants issued by secret courts.

Security-minded lawmakers say FISA is an important tool that can be used to keep Americans safe.

Representative Jerrold Nadler, chairman of the House Judiciary Committee, told a Rules Committee hearing on Tuesday that the agreement would help rein in abuses of FISA, which established a secret court for surveillance cases.

“This bill is an important package of reforms,” he said.