WASHINGTON, Oct. 23  Richard L. Thornburgh, attorney general in the Reagan and first Bush administrations, charged Tuesday that political reasons motivated the Justice Department to open corruption investigations against Democrats in Mr. Thornburgh’s home state, Pennsylvania.

In testimony before the House Judiciary Committee, Mr. Thornburgh became the first former Republican attorney general to join with Democratic lawmakers to suggest that the Justice Department under Attorney General Alberto R. Gonzales had singled out Democratic politicians for prosecution.

“The citizens of the United States must have confidence that the department is conducting itself in a fair and impartial manner without actual political influence or the appearance of political influence,” said Mr. Thornburgh, who is now in private practice. He is defending the former elected Democratic coroner of Allegheny County, Pa., against federal corruption charges. “Unfortunately that may no longer be the case.”

His unusually harsh criticism of fellow Republicans was directed specifically at the United States attorney in Pittsburgh, Mary Beth Buchanan, who was director of the Executive Office of United States Attorneys, based in Washington, in 2004 and 2005. That office has come under scrutiny for its role in the dismissal of United States attorneys last year, in some cases for what appear to have been partisan reasons.