The Senate approved legislation last night that would make permanent most provisions of the USA Patriot Act anti-terrorism law while placing new limitations on the government's use of secret search and surveillance powers.

The vote, by unanimous consent in the GOP-controlled Senate, marks a defeat for the Bush administration, which campaigned heavily for total renewal of the law and opposed efforts to enact any new restrictions on government powers. The vote sets up fall negotiations between the Senate and the House, where lawmakers have approved legislation with fewer restrictions.

The congressional debate was complicated by a decision released yesterday in California, where a federal judge ruled for the second time that several provisions of the Patriot Act and related laws are unconstitutional.

The Senate bill mirrors legislation sponsored by Sens. Arlen Specter (R-Pa.) and Dianne Feinstein (D-Calif.) and passed unanimously July 21 by the Senate Judiciary Committee. It would tighten restrictions on the FBI's power to seize financial documents and other business records and would place a four-year limit on two of the Patriot Act's most controversial provisions.

Most of the law would become permanent, however, and the Justice Department would retain most of the new power it was granted when the law was approved by Congress after the Sept. 11, 2001, attacks.

Specter said the bill includes "responsible changes to safeguard civil liberties." Senate Minority Leader Harry M. Reid (D-Nev.) said that although the bill includes "provisions that are not supported by everyone in this body," it is a compromise he can support.

The reconsideration of the Patriot Act was prompted by language in the original law that requires 16 provisions to expire at the end of this year unless renewed by Congress. Although the American Civil Liberties Union and some other advocacy groups have objected strenuously to broad aspects of the law, most of the congressional debate has focused on a few of the most controversial provisions.

They include one measure that allows the FBI to seize records from financial companies, libraries, doctors' offices and other businesses with approval from the secret Foreign Intelligence Surveillance Court, and another that permits "roving wiretaps" that apply to a person rather than a phone number.

The House bill extends those two provisions for 10 years, but the Senate version limits them to four years unless renewed by Congress again.

The Senate legislation would tighten the requirements that must be met in order to seize business records, allow people to challenge warrants issued by the secret intelligence court, and require that the subjects of secret searches be notified within seven days unless an extension is approved by a judge.

"We are confident Congress will ultimately send the president a bill that does not undermine the ability of investigators and prosecutors to disrupt terrorist plots and combat terrorism effectively," said Tasia Scolinos, spokeswoman for the Justice Department.

Lisa Graves, the ACLU's senior counsel for legislative strategy, said the group is pleased that the Senate bill does not include other measures that had been considered by lawmakers, including giving the FBI the power to issue administrative subpoenas without a judge's approval in terrorism probes. She also said the Senate version is "vastly better" than the House bill. But Graves said the "ACLU was unable to endorse the final bill" because of remaining objections, and she urged lawmakers to view the legislation as a "starting point" to larger changes.

The legislation approved last night does not take into account a 42-page ruling issued in Los Angeles by U.S. District Judge Audrey B. Collins, who found that several terms in the Patriot Act and other related laws are "impermissibly vague" and violate the Fifth Amendment.

The decision is the second time Collins has found parts of the federal government's anti-terrorism laws unconstitutional and came despite Congress's attempt last year to clarify the terminology in response to her earlier ruling.

The case stems from legal challenges by groups who provide aid to Kurdish refugees in Turkey and the Tamil minority in Sri Lanka. The plaintiffs argued that the Patriot Act and other laws prevent them from providing humanitarian assistance and advice to nonviolent wings of two groups designated as terrorist by the State Department.

Collins's latest decision found that language in the Patriot Act and related statutes referring to "training," "expert advice and assistance" and "service" is too vague. Collins sided with the Justice Department in other areas of the case, rejecting complaints that the Patriot Act is overly broad or infringes on free-speech rights.

"We're happy that the court has struck these three provisions down, but we're still troubled by the broader expanse of the statute," said David Cole, a Georgetown University law professor representing plaintiffs.

Scolinos said the Justice Department is "pleased that the judge ruled in favor of the government in four out of five claims."