Washington • The Republican-controlled Senate on Thursday advanced an effort to expand the power of the Justice Department’s independent watchdog to investigate allegations of ethical violations and professional misconduct by department lawyers, overriding the objections of Attorney General Bill Barr.

The Senate Judiciary Committee voted 21-1 to approve the bipartisan measure, which unanimously passed the House last year. It would shift the responsibility for investigating lawyer misconduct from an office under Barr’s supervision to the department’s independent inspector general, Michael E. Horowitz.

“The negative ramifications of shielding attorney misconduct from inspector general scrutiny and, eventually, public scrutiny are not hypothetical,” said Sen. Mike Lee, R-Utah, the bill’s lead author. He cited the failure of prosecutors to turn over mitigating evidence in the 2008 corruption trial of former Sen. Ted Stevens and limits that had been placed on Horowitz while he scrutinized the FBI’s Russia investigation.

“This is a problem that Congress should want to fix,” Lee added.

Lawmakers’ push to expand the jurisdiction and powers of the department’s inspector general predates the Trump administration, but its advance is particularly noteworthy at a time when Barr is already under intense scrutiny for prosecutorial and personnel decisions that critics say smack of political motivation. This week, two department lawyers accused Barr and other department leaders of politicizing criminal and antitrust cases, issues that Democrats say ought to be under the inspector general’s jurisdiction.

It also coincides with a broad campaign by President Donald Trump to impose greater political control over independent inspectors general, including a flurry of firings and demotions and the unprecedented decision to install, as acting replacements, political appointees who remain under the control of the agency heads they are supposed to police.

Barr said that he had not politicized the department to benefit the president. “I would say that that is a media narrative,” Barr said in an interview with NPR. “Things that happen all the time in the Department of Justice are misrepresented to the public and cast as somehow suspicious.”

Attorneys general of both parties have objected to giving the inspector general the authority to investigate allegations of misconduct and ethical violations by department lawyers. One concern is that there would be pressure to open inquiries into every decision the Justice Department makes in politically charged matters, inhibiting its legitimate authority to exercise prosecutorial discretion.

Over the past few weeks, Barr and Jeffrey A. Rosen, the deputy attorney general, personally lobbied Lee and Sen. Lindsey Graham, R-S.C., the committee’s chairman, while staff members in the department’s Offices of Legislative Affairs and Legal Policy worked to persuade other committee members to modify it, according to three people with knowledge of the discussions.

Barr argued that no bill should allow the inspector general to supersede his existing powers and that the attorney general must be fully responsible for all investigations and indictments, according to multiple people briefed on the conversations. His own compromise suggestions were rejected, they said.

The department was unsuccessful. Senators on the panel nearly unanimously supported the bill and opposed an amendment by Graham that would have given Barr the authority to veto inquiries proposed by the inspector general that he felt were inappropriate second-guessing of acts of prosecutorial discretion.

Barr will now have to persuade Sen. Mitch McConnell, R-Ky., the Senate majority leader, not to allow a final vote — which would most likely result in a veto-proof bipartisan majority — or package the measure with a separate must-pass bill.

Barr is not wholly opposed to giving the inspector general the power to investigate the department. Last week, he granted Horowitz the authority to investigate any allegations of unethical interventions in the work of federal prosecutors in Manhattan — a move intended to quell suspicions that Barr had sought last week to oust the former U.S. attorney there because the office is investigating people associated with Trump.

Graham said before Thursday’s vote that he had worked to try to find a compromise without success. His proposed amendment would have allowed the attorney general to veto inspector general investigations into purported professional misconduct by lawyers, although such a dispute would have to be reported to Congress. But Barr still balked, he said.

“Here’s what I’ve concluded after two weeks of dealing with this: You are never going to find something acceptable to the Department of Justice,” Graham said.

Fellow Republicans led the charge to defeat Graham’s proposed change. Lee said it would practically give the attorney general “broad, almost unbounded discretion to reject” proposed investigations by the inspector general.

Sen. Charles E. Grassley, R-Iowa, said he saw no need to give the attorney general any veto power.

“Sensitive investigations happen every day,” he said. “IGs are capable of handling this.”

Republicans said they were supporting the legislation despite their high regard for Barr. Democrats portrayed it as a tool that could help hold an attorney general they believe is improperly and corruptly contorting the justice system for Trump’s political gain.

“Developments of the last week, especially the termination of the U.S. attorney of the Southern District of New York, make it even clearer how much this legislation is needed,” said Sen. Richard J. Durbin, D-Ill.

Lawyers at other departments and agencies that carry out significant law enforcement activities, like the Securities and Exchange Commission, are scrutinized by their inspectors general. The exception at the Justice Department dates to the aftermath of the Watergate scandal, when the department created an internal office — whose leader reports to the attorney general — to police ethics violations and other professional misconduct.

In 1978, when Congress created the inspector general system, it did not create one for the Justice Department because it already had that office. But 10 years later, Congress created a limited Justice Department inspector general, and in 2002 lawmakers expanded its mandate to encompass allegations of misconduct by agents of the FBI and the Drug Enforcement Administration.

That left only professional misconduct by lawyers exempted from the inspector general’s mandate, except on rare occasions when the attorney general asks the office to investigate something. In 2008, the House voted to close that gap, but the overhaul died in the Senate. Proponents of the idea tried again during the Obama administration, but again fell short.