*Editor's note: This story has been updated throughout.

Texas’ top health care fraud investigator resigned Wednesday night under pressure from the governor, the result of media inquiries that revealed Texas Health and Human Services Inspector General Stuart Bowen was moonlighting for a private firm that provided services for the government of Iraq.

An unsigned contract found in Bowen’s government email inbox, provided to The Texas Tribune by state officials, revealed that the Denver-based lobbying firm Brownstein Hyatt Farber Schreck offered to pay Bowen $300 per hour for “business development strategy and consulting services.” He would also receive a 15 percent “origination fee” from the lobby firm for any work it engaged in with the government of Iraq.

The lobby firm registered as a foreign agent for the government of Iraq in late 2016 and worked to establish contact between Iraqi government officials and the administration of President Donald Trump. A letter sent by the firm in February to U.S. Secretary of State Rex Tillerson invokes Bowen’s name as a friend of Trump administration officials.

A spokeswoman for Brownstein Hyatt Farber Schreck said Bowen did not provide any legal or lobbying services.

The letter was sent at a time when the president was re-drafting an executive order that sought to ban travel to the U.S. from several Middle Eastern nations. One month later, the president issued a new executive order that dropped Iraq from the list of countries named in the travel ban.

A spokesman for Gov. Greg Abbott said Bowen, whose primary job was to root out fraud and abuse in the state's Medicaid program, had made “a serious and unacceptable lapse in judgment.”

“The day the governor was made aware, he took immediate action and asked Mr. Bowen to resign,” John Wittman, the spokesman, told The Texas Tribune. "The governor is confident the next Inspector General will continue the good work the office has been doing.”

Abbott has defended Trump’s travel ban, calling the executive order “perfectly legal, and it’s not even close.”

Before his appointment by the governor, Bowen served as the U.S. special inspector general for Iraq reconstruction for nearly a decade. The Austin American-Statesman and Texas Monthly first reported on Bowen’s lobbyist connections to the Iraqi government on Thursday.

In an emailed statement, Bowen denied doing any work "regarding the travel ban issue" and said he had consulted with a state ethics advisor about his moonlighting. "My efforts for the law firm fully complied with that advice, with [the health commission's] ethics policy, and state law," he said.

The health agency's policies explicitly bar employees from having an "economic or monetary interest in a lobbying firm," including as a consultant. Additionally, the Brownstein firm has extensive dealings in the health care industry, a possible conflict of interest for Bowen as an employee of the Health and Human Services Commission.

Bowen said he had been originally contacted in Oct. 2016 by a family friend working for a D.C. law firm who wanted help making an introduction to the Governor of the Iraqi Central Bank. A month later, the law firm offered to pay him for advice "on anti-corruption efforts related to the financial services sector in Iraq for a brief period," he said.

In a short resignation letter obtained by the Tribune, Bowen boasted of his track record in Texas government. He arrived at the Health and Human Services Commission in January 2015 at a time of turmoil, after his predecessor, Doug Wilson, had been forced to resign amid a scandal over a different government contract.

"I am proud of the many successes that my truly outstanding staff and I have succeeded in securing as we turned the office into the high performing oversight agency that it is today," Bowen said.

The Office of Inspector General announced Thursday that Principal Deputy Inspector General Sylvia Kauffman will lead the agency for the meantime in Bowen’s stead.

Patrick Svitek and Marissa Evans contributed reporting.

Read related coverage:

In 2015, Stuart Bowen took charge of a state office rocked by accusations of corruption, incompetence and inefficiency.

In his first public appearance as HHSC's chief watchdog, Bowen said he planned to right a department rocked by a contracting scandal by focusing not just on Medicaid and food stamp fraud, but all types of inefficiencies in the $37 billion state social services empire.