The chairman of the House Select Committee on Benghazi, Rep. Trey Gowdy (R-S.C.), pictured in June, denied Bradley Podliska’s allegations that he was wrongly fired. (Michael Reynolds/European Pressphoto Agency)

The House Select Committee on Benghazi has settled a lawsuit brought by a former staffer who alleged that he was fired in part because he was unwilling to focus solely on the State Department and Hillary Clinton in order to understand the attacks, attorneys for the staffer said.

The settlement ends a messy dispute that raised questions about whether the committee — formed to investigate the 2012 attacks that killed four Americans at U.S. facilities in Benghazi, Libya — was trying to achieve partisan goals.

The staffer, Bradley Podliska, alleged in court papers that he was fired “because he was unwilling to go along with the hyper-focus on the State Department and Secretary Clinton based upon the fact that his comprehensive, thorough, and objective investigation was pointing at other agencies and individuals and not solely the State Department and Secretary Clinton.”

He also alleged that supervisors retaliated against him because he had to take two leaves to fulfill his obligations as an Air Force reservist.

In a statement provided by his lawyer, Podliska said, “I am happy to move beyond this dispute, and I will continue to serve my country and do whatever I can do to advance the security and interests of our nation.” His lawyer, Peter Romer-Friedman, declined to provide the terms of the settlement, saying the agreement was secret.

Spokesmen for the committee and its chairman, Rep. Trey Gowdy (R-S.C.), did not immediately return messages seeking comment.

The Benghazi committee has long faced criticism that its work turned into an effort to undermine Clinton’s bid to become president. At one point, House Majority Leader Kevin McCarthy (R-Calif.) suggested that the investigation had helped spur a drop in Clinton’s poll numbers.

Democrats also charged that the effort, which cost $7 million and took two years, was a waste of time and money. The final report by the Republican majority found serious flaws in the U.S. response to the attack but produced no new revelations of specific wrongdoing by Clinton.

It was against that politicized backdrop that Podliska first made his allegations in 2015. He said that when he came back from a military leave, his supervisors were hostile toward him.

According to his lawsuit, a supervisor saw Facebook pictures Podliska had posted while in Germany in May 2015 and believed — wrongly, in Podliska’s estimation — that the reservist was abusing his leave.

But Podliska also alleged, both in his lawsuit and publicly, that he was fired because he resisted demands to focus his efforts on Clinton and the State Department. Gowdy at the time denied Podliska’s allegations.

“What the record makes clear is he himself was focused on Clinton improperly and was instructed to stop, and that issues with his conduct were noted on the record as far back as April,” Gowdy told The Washington Post in October 2015.

The committee, in responding to Podliska’s lawsuit, said his termination was for other reasons than those he claimed.

“This decision was a result of Plaintiff’s repeated lapses in judgment, including Plaintiff’s unwillingness to perform — or inability to understand — the Committee’s investigation, his apparent inability to handle potentially classified information properly, and other professional deficiencies,” lawyers for the committee wrote.

Podliska continues to serve in the Air Force Reserve as a major, his lawyer said.