WASHINGTON — The Senate Judiciary Committee on Thursday advanced a bill to shield reporters from being forced to reveal their sources in federal court, setting up a floor fight between supporters and Bush administration allies who believe the measure would harm national security.

The 15-2 vote sent the legislation to the Senate floor, where it was expected to face more challenges if not efforts to stall or kill it. A similar measure also awaits floor action in the House.

House Speaker Nancy Pelosi told the Associated Press Managing Editors in a speech Thursday that she will bring it up for a vote this year.

"This is fundamental to our democracy and fundamental to the security of our country," Pelosi said. More than 50 news outlets, including the AP, support the bill.

The Bush administration opposes the measure on grounds it would make it harder to trace the source of leaks that could harm national security.

U.S. Attorney Patrick Fitzgerald echoed that argument Thursday in a newspaper opinion piece. Proponents of a federal shield law got momentum from Fitzgerald's decision to subpoena reporters to testify against White House aide I. Lewis "Scooter" Libby in a case that grew out of Fitzgerald's CIA leak probe. Libby was convicted of obstruction, perjury and lying to the FBI; his sentence was commuted by President Bush.

Writing in opposition to Fitzgerald in The Washington Post, former Bush administration solicitor general Theodore B. Olson argued for the proposed federal law, saying state shield laws have worked well.

The bill includes exemptions for cases in which investigators are tracking acts of terrorism in the U.S. and other countries. An amendment by Sen. Sam Brownback, R-Kan., would keep accused spies, agents of foreign countries and terrorists from claiming the same protections extended to journalists.

Associated Press writer Jennifer Kerr contributed to this story.