Editor’s note: This article has been updated to include a statement from Stuart W. Bowen Jr.

Stuart W. Bowen Jr., the inspector general for the Texas Health and Human Services Commission, resigned last night amid questions from Texas Monthly about his role in getting Iraq removed from President Trump’s ban on travel from Middle Eastern nations. Since April 27, I have had an open records request pending with HHSC for information relating to Bowen’s work with a lobby firm representing Iraq’s prime minister.

Before Bowen was appointed by Governor Greg Abbott in 2015 to monitor $40 billion a year in state health and welfare spending, he was the U.S. inspector general for the reconstruction of Iraq. I recently found out that he had been hired as a senior advisor to a Washington lobby firm that had registered as a foreign agent for the government of Iraq in late 2016. The lobby firm repeatedly invoked Bowen’s name in letters to senior Trump administration officials seeking meetings between them and a senior Iraqi aide to Prime Minister Haider al-Abadi (Bowen said that he did not authorize the firm to use his name). On April 6, al-Abadi posted a photograph of himself standing next to Bowen at a United Nation’s conference on corruption in Iraq.

Stuart Bowen in red tie stands to the left of Iraq Prime Minister Haider al-Abadi. Posted on al-Abadi’s Twitter feed April 6

Bowen’s connection to the law firm only became public through the firm’s foreign agent registrations. Even though Bowen was tasked with looking for fraud in one of Texas’s largest government agencies, he apparently was not required to file a personal financial disclosure form. Though Bowen is cited in the letters, he had not personally registered as an agent of a foreign government. An unsigned copy of his contract with the firm shows he is to be paid $300 an hour up to 33 percent of the firm’s total payments from Iraq.

Bowen said in a statement that in October 2016 a family friend who works for a Washington, D.C. law firm contacted him to ask for help connecting with the governor of the Iraqi Central Bank. Bowen made the introduction. The next month, according to Bowen, the firm approached him again for advice on anti-corruption efforts related to the financial services sector in Iraq, offering to pay him hourly. Bowen said that he consulted with the HHSC ethics advisor about the outside work. “My efforts for the law firm fully complied with that advice, with HHSC ethics policy, and state law,” he said in the statement. “I have never worked for Iraq and was not involved in any law firm activities regarding the travel ban issue.”

On January 27, President Trump signed an executive order banning travelers from seven Middle Eastern nations, including Iraq. The order was later overturned in federal court, but not before it set off a furious lobbying effort to get Iraq removed from the list.

The lobby firm of Brownstein Hyatt Farber Schreck approached administration officials about two weeks after Trump signed the initial travel ban, The Hill reported. Between February 9 and February 13, the firm repeatedly invoked Bowen’s name in letters to Trump administration officials, referring to him as a “senior adviser to our firm” and urging Trump’s executive team to meet with a senior Iraqi official representing the nation’s prime minister. On March 6, Trump signed a new executive order that didn’t include Iraq in the travel ban list.

Lobbyist R. James Nicholson signed the Brownstein letters. During the George W. Bush administration, Nicholson was secretary of the Department of Veterans Affairs from 2005-07 and previously served as chairman of the Republican National Committee from 1997-2001. Nicholson addressed the letters to Secretary of State Rex Tillerson, Secretary of Defense James Mattis, Homeland Security Secretary John F. Kelly, presidential security adviser Tom Bosser, and U.S. Senators Lindsey Graham and Jack Reed. Another was directed to then-National Security Adviser Michael T. Flynn, who resigned several days later amid an unrelated controversy over his misrepresentation of discussions with the Russian ambassador before taking office.

Each of the letters noted Bowen’s relationship to the firm. In the one to Mattis, Nicholson personalized it by writing, “Stuart Bowen the former Special Inspector General for Iraq Reconstruction under President Bush and has worked with you in the past, is a senior advisor to our firm.” Mattis, a retired Marine Corps general, at one time commanded troops in Iraq and Afghanistan.

As the inspector general in Iraq, Bowen had discovered waste and fraud totaling more than $60 billion. Abbott appointed Bowen in 2015 to oversee the state’s health and human services spending after the previous inspector general resigned amid the 21CT contracting scandal.

In recent months, Bowen has been controversial for ordering Texas to cut off funds to Planned Parenthood because of a disputed undercover video that supposedly shows officials with the women’s health organization selling fetal tissue from abortions.

Bowen’s resignation letter to Abbott stated simply that he is leaving “so that I may pursue new opportunities that are before me.” HHSC Commissioner Charles Smith has not yet responded to requests for comment.

“This was a serious and unacceptable lapse in judgment by Mr. Bowen,” John Wittman, Governor Abbott’s press secretary, wrote in an email to Texas Monthly. “The day the governor was made aware, he took immediate action and asked Mr. Bowen to resign. The governor is confident the next Inspector General will continue the good work the office has been doing.”

UPDATE: Lara Day, the chief communications officers for the Brownstein law firm sent this over:

“Brownstein Hyatt Farber Schreck asked Stuart Bowen to consult on behalf of its clients. Before any work started, Brownstein confirmed with Bowen that his employer’s ethics advisor said consulting for Brownstein was permissible because it created no conflict with Bowen’s work at the Texas Health and Human Services Commission. Bowen did not provide legal or lobbying services for Brownstein or its clients nor did he work on any efforts to reverse the travel ban. Bowen has never been an employee of Brownstein.”