On the campaign trail, there is much talk of bipartisanship, but back on Capitol Hill, that spirit has vanished. The latest example: collapse of Senate negotiations to help homeowners threatened with foreclosure.

However, one important piece of legislation does command strong support across party lines: a federal shield law giving journalists greater protection from overzealous lawyers and prosecutors trying to pry loose their confidential sources. Congress should pass it, and quickly.

Forty-nine states (Wyoming is the exception) provide journalists with some form of safeguard, but none exists on the federal level. A measure closing that gap passed the House last fall, 398 to 21, and a similar bill cleared the Senate Judiciary Committee, 15 to 2. Sen. John McCain recently joined his Democratic rivals in supporting a shield law.

In a speech to the Associated Press annual meeting, McCain warned that such a law could give journalists "a license to do harm." But the benefits outweigh the costs, he said, because such a measure was also "a license to do good, to disclose injustice and unlawfulness and inequities, and to encourage their swift correction."

The Bush administration has staged a fierce counterattack against the proposal, and that's no surprise. This White House has always embraced secrecy and rejected accountability. The last thing it wants is "swift correction" of its own unjust and unlawful actions.

Fortunately, many Republicans who value limited government and civil liberties are standing up to the administration. Take Rep. Mike Pence of Indiana, who asked during the floor debate: "What's a conservative like me doing passing a bill that helps reporters?" His answer: "The only check on government power in real time is a free and independent press."

Passage of a shield law has taken on new urgency, and one reason is a growing number of court cases aimed at forcing reporters to spill their secrets. Former New York Times journalist Judith Miller spent 85 days in jail for refusing to identify her sources, and now Toni Locy, a former staffer for USA Today, is facing financial ruin for the same reason.

A vindictive federal judge has slammed Locy with a fine of $5,000 a day, and barred anyone else from paying the debt, because she won't tell him who provided information for stories she wrote about anthrax attacks against government officials in 2001.

True, journalists are not exactly filling up the nation's jails, but examples like Miller and Locy are highly symbolic. They can scare sources into silence and reporters into timidity. As Clark Hoyt, public editor of the New York Times, wrote: "Breaking Toni Locy sends exactly the wrong signal in an era of increasing government secrecy."

Sen. Arlen Specter, ranking Republican on the Judiciary Committee, raised the second reason for a federal shield law. Press freedoms "in fledgling democracies" like Russia are under heavy fire. As a result, he wrote in the Washington Post, "Americans can see just how essential a free media are to democracy and how easily they can be chilled."

The third argument for legislation flows from the changing nature of the media marketplace. Investigative journalism is both expensive and time-consuming and since even the most solid old-line outlets are losing money, the temptation to cut costs and downsize investigative units is enormous. The threat of legal pressures (and legal bills) increases incentives to get out of the dirt-digging business.

New players in the field blogs, Web sites, citizen journalists provide a welcome diversity of voices but don't have the "reportorial horsepower" to break a big story that challenges the government, noted former Los Angeles Times editor John Carroll. "And if a blog did manage to break the story, it would likely be crushed in the aftermath," he added. The lawyers' fees alone "could be a ticket to bankruptcy."

Any federal shield law has to be reasonable, not absolute, and must reconcile two essential American principles: the right to know, and the right to be safe. Reporters are citizens, too, with obligations to protect national security and identify criminals. And critics make a fair point: The privilege must be limited to legitimate journalists, and should not be extended to foreign agents posing as reporters.

But with a little effort and goodwill, these problems can be solved. All those foes of a shield law in the Bush White House should think about this for a moment. What if Barack Obama becomes president? Wouldn't you feel more comfortable with a free and fearless press holding his feet to the fire?

Steve Roberts' latest book is "My Fathers' Houses: Memoir of a Family" (William Morrow, 2005). Steve and Cokie Roberts can be contacted by e-mail at stevecokie@gmail.com.