Under intense scrutiny from congressional critics and a probing inspector general, current and former Securities and Exchange Commission officials have been lawyering up, sometimes at their own expense.

The practice reflects the highly charged atmosphere at the SEC and one of the costs of government service when investigations can put careers, reputations and more on the line.

It goes all the way to the top.

On an afternoon in April, when SEC Chairman Mary Schapiro met privately with members of the inspector general’s office to give sworn testimony on a $557 million lease for office space the agency did not need and could not afford, SEC Inspector General H. David Kotz asked a person accompanying Schapiro to identify himself.

The man said he was Richard Sauber, “counsel for Ms. Schapiro,” according to a record of the session. Sauber is a partner in a Washington law firm and a veteran of the Justice Department.

Former SEC general counsel David M. Becker has hired lawyer William R. Baker III in connection with an open probe into an alleged conflict of interest involving the agency’s work on compensation for victims of Bernard Madoff’s investment fraud. Baker previously worked in the SEC’s enforcement division.

In the same Madoff-related probe, William Lenox, former head of the SEC’s ethics office, is represented by Harvey L. Pitt, a former SEC chairman, according to people familiar with the matter who spoke on the condition of anonymity to discuss confidential information.

But Pitt is representing Lenox for free, those people said. And he has done the same for other SEC officials caught up in inspector general probes, one of the sources said.

The hiring of lawyers has become common when the SEC becomes the subject of investigations and political recriminations, people close to the agency say. SEC spokesman John Nester said SEC lawyers are not allowed by the agency to represent employees in connection with inspector-general probes.

Given all that is on the line in these investigations, it is not surprising that people would want an attorney in their corner, said a lawyer who has represented employees in inspector-general probes.

“The I.G. has the ability to make a criminal referral. So an I.G. investigation can be career- and liberty-threatening. And financially threatening,” said the lawyer, who did not want to be quoted by name to avoid antagonizing the inspector general.

Kotz’s reports have found fault on issues as diverse as a troubled technology contract, the SEC’s failure to act on warnings about an alleged mutibillion-dollar fraud by Robert Allen Stanford, who controlled a bank in Antigua, the agency’s failure to stop Madoff, and employees’ use of SEC computers to view pornography on the job.

Some of his reports have included recommendations that the SEC consider disciplining employees. In the case of the office lease, Kotz suggested that the Justice Department consider whether anyone should be prosecuted for backdating a document used to justify the lease.

Meanwhile, members of Congress, especially House Republicans, have used inspector-general reports as ammunition to challenge the SEC’s budget requests, sometimes calling hearings to showcase the findings.

The probing is playing out amid high-stakes battles over how the SEC should police and regulate Wall Street.

The inspector general is scheduled to complete a report this week on the SEC’s handling of the alleged conflict of interest involving agency policy toward Madoff investors. Lawmakers are gearing up to hold a hearing on the matter.

At issue is the fact that Becker helped shape SEC policy on Madoff victim compensation, even though his late mother’s estate had included a purported $2 million account with Madoff. Becker had told the SEC chairman about the account and had run the issue by the agency’s ethics counsel.

Congressional overseers expect the report to raise questions about Schapiro’s judgment in allowing Becker to participate in the policy work and for leaving other commissioners in the dark about his mother’s account, according to Republicans on Capitol Hill, speaking on the condition of anonymity because the report has not yet been issued.

Nester, the SEC spokesman, declined to comment on Schapiro’s legal representation, including whether she has used a lawyer in the Becker probe. “Without commenting on any individual, it is not uncommon for employees to obtain legal counsel for an inspector-general investigation,” he said. “Each individual is responsible for his or her legal costs if they retain private counsel,” Nester said.

Asked to comment for this story, Pitt, Baker and Kotz declined. Becker did not return a call. Lenox could not be reached.

A colleague of Schapiro’s recounted that the SEC chairman once said that she had incurred tens of thousands of dollars of legal expenses in connection with an inspector-general probe last year involving the agency’s handling of a case against Goldman Sachs. The colleague spoke on the condition of anonymity because the conversation was private.