The following editorial appeared recently in the Los Angeles Times:

President Obama may be engaging in political damage control in proposing that Congress resurrect legislation to protect the confidentiality of journalists' sources. But his call for action on a federal shield law is welcome even if inspired by a desire to deflect criticism of the Justice Department's seizure of the phone records of The Associated Press.

Although described as a "reporter's privilege," protection for confidential news sources actually benefits the public by making it easier for journalists to obtain information about wrongdoing in government and elsewhere. That's why most states, including California, provide some protection for journalists who have promised confidentiality to their sources. In addition, long-standing Justice Department regulations require it to seek information from other sources before going after information that might expose a journalist's confidential sources.

But a federal shield statute is still necessary, as the Justice Department's acquisition of the AP's phone records demonstrates.

Under shield legislation introduced in 2009, the FBI and prosecutors would have had to obtain a judge's permission before obtaining information from a journalist that might compromise a confidential source. The privilege wouldn't have been absolute: Judges would have had to balance "the public interest in compelling disclosure" against "the public interest in gathering news and maintaining the free flow of information." Disclosure by journalists could have been compelled when the information sought by the government was necessary to prevent a death or kidnapping, an act of terrorism or other significant harm to national security.

That legislation faltered over several issues, including the scope of the national security exception and disagreements about whether the privilege would be available to "citizen journalists" and bloggers. Support also softened after WikiLeaks disseminated reams of classified information.

Politically motivated or not, Obama's enthusiasm for a shield law is a positive development, especially given his administration's record of pursuing the press to prosecute government officials who violate confidentiality rules. Republicans who have criticized the seizure of the AP's phone logs should join the cause. Otherwise their sudden interest in freedom of the press will be exposed as partisan and opportunistic.