The Securities and Exchange Commission has agreed to pay $580,000 in a settlement with a former assistant inspector general who said the agency fired him for exposing possible misconduct.

The SEC reached its agreement last month with David Weber, who is allowed to return to his job as part of the terms, his attorney, Cary J. Hansel, said. The SEC also agreed to clear his record, removing negative references from his file, Hansel said.

“The settlement resolves the matter to everyone’s satisfaction and permits the Office of the Inspector General to continue to focus on its important work,” said SEC spokesman John Nester.

In March 2012, Weber alleged that a former superior had been involved in inappropriate relationships with women who worked with him on several reviews. He also raised security concerns relating to SEC computers that contained stock-exchange data.

A September report by the U.S. Postal Service’s inspector general found that the superior’s relationships created potential conflicts of interests.

In addition, the report found merit in Weber’s concerns about computer security. The SEC said it has addressed the issue.

“Although we found no evidence that data was compromised, the problem was fixed, and the two staffers responsible for maintaining and configuring the equipment are no longer with the agency,” said SEC spokeswoman Florence Harmon.

The agency placed Weber on paid administrative leave in May 2012 after allegations that he created a hostile work environment and displayed threatening behavior by talking about bringing a firearm to work and wearing a bulletproof vest at the office. The Postal Service inspector general investigated those accusations but did not substantiate them.

Hansel said Weber donned a bulletproof vest as a joke after colleagues placed smiley-face stickers on it. He said his client talked about firearms at work only in the context of recertifying special agents to carry weapons after certification for that office had lapsed.

A week after being placed on leave, Weber took his data-security concerns to the Senate Judiciary Committee, prompting an unnamed senator to meet with SEC Chairman Mary L. Shapiro and other commission staff, according to a complaint Weber filed with the U.S. District Court for the District of Columbia.

The SEC fired Weber in October. He now teaches forensic investigation and accounting at the University of Maryland University College.

“Doing the right thing can be hard — just as my family and I experienced,” Weber said. “Now that my name has been cleared, I look forward to helping others through my growing law and forensic investigations practice.”