WASHINGTON (Reuters) - U.S. telephone companies that took part in President George W. Bush’s warrantless domestic spying program could be shielded from billions of dollars in lawsuits under a electronic spy bill finalized on Thursday by congressional and White House negotiators.

A telephone is seen in an undated file photo. REUTERS/Catherine Benson

Under the measure, federal courts would determine if the evidence supports protection of companies from civil liability.

They would be able to dismiss a suit if there is written certification that the White House asked a company to participate and assured it of the legality of the warrantless surveillance that Bush secretly began after the September 11 attacks.

With legal action pending against major telecommunications companies, House Republican Whip Roy Blunt said courts will make the call but predicted, “The lawsuits will be dismissed.”

The bill would provide the most sweeping overhaul of U.S. spy powers in decades. In addition to court review of lawsuits, it would increase judicial and congressional oversight of U.S. intelligence activities and bolster protection of civil liberties -- but not as much as some advocates would like.

A vote on the bipartisan bill was set for Friday in the Democratic-led House of Representatives, which was expected to approve it overwhelmingly.

It would then be sent to the Democratic-led Senate, which is expected to give it final congressional approval next week and send it to Bush to sign into law.

“It’s a balanced bill,” said House Speaker Nancy Pelosi, a California Democrat. She did not say how she would vote, however. “I could argue it either way,” she told reporters.

“The bill meets the standards the president called for,” said White House spokesman Tony Fratto. “We encourage members of both parties to pass it.”

House Democratic Leader Steny Hoyer, a chief negotiator of the measure, said, “This bipartisan bill balances the needs of our intelligence community with Americans’ civil liberties, and provides critical new oversight and accountability.

But Sen. Christopher Dodd, a Connecticut Democrat, denounced the measure as “deeply flawed.”

“The president should not be above the rule of law, nor should the telecommunications companies who supported his quest to spy on American citizens,” Dodd said.

CRITICS ACCUSE BUSH

Critics charged Bush violated the 1978 Foreign Intelligence Surveillance Act in authorizing warrantless surveillance after the September 11 attacks. Bush maintains he had the wartime power to do it. He put the program under FISA jurisdiction last year. Terms remain secret.

The new bill would replace a temporary law that expired in February that expanded U.S. power to conduct surveillance of foreign targets without court approval. Law-abiding Americans were also swept up in surveillance, particularly if they came in contact with these targets.

About 40 civil lawsuits have been filed accusing AT&T Inc, Verizon Communications Inc and Sprint Nextel Corp of violating Americans’ privacy rights. Damages could total billions of dollars.

Some Democratic lawmakers along with civil liberties groups have opposed shielding phone companies from lawsuits, saying the courts should first determine what the companies did.

But Bush and others have argued that these companies should be thanked, not punished, for agreeing to help protect the United States.

The bill would amend FISA, which requires the government receive secret-court approval to conduct surveillance on foreign targets in the United States.

As part of any bill to update FISA, Bush had demanded retroactive immunity for phone companies.

The Senate agreed to provide such immunity, but House Democratic leaders refused to even bring the Senate bill up for a vote in their chamber, forcing a compromise.

“Democrats obtained some concessions from the White House, but unfortunately the bill continues to allow unconstitutionally broad access to untold numbers of private international e-mails and phone calls of American residents and businesses,” said Lisa Graves, deputy director of the Center for National Security Studies, a Washington watchdog group.