As Special Counsel Robert Mueller’s investigation into Russian meddling in the 2016 presidential election was concluding, Rudy Giuliani, President Donald Trump’s personal attorney for the probe and other legal woes, landed a new client: the Kingdom of Bahrain.

On Thursday, the former New York City mayor confirmed to The Daily Beast that his security and consulting firm, Giuliani Security and Safety, had officially secured a contract with the Gulf nation’s Ministry of Interior to help train their police force.

“They are contracting with my company to do security consulting for them, with specific emphasis on things that appear to be perpetrated by terrorists…specifically in regard to [alleged] terrorist acts perpetrated in large part by Iran or Iranian proxies,” Giuliani said in an interview.

Talks between Giuliani’s “global security services” company and the government in Bahrain began in August or September 2018, he said. They took place even as Giuliani was representing President Trump as the Mueller investigation was ongoing, and while he was serving as one of President Trump’s more regular advisers and confidants. Giuliani is still working as the president's lawyer, even though the redacted Mueller report has been delivered to the Department of Justice and made public.

While the Bahraini government was enlisting Giuliani for help with its police force, it was also attempting to influence Trump administration policy.

Bahrain officially employs half a dozen lobbying and public-relations firms in the United States, according to the Justice Department’s database of registered foreign agents. They work on issues ranging from counterterrorism efforts to trade and foreign investment promotion to more vaguely defined advocacy and public affairs initiatives. Specific goals in Washington, D.C., include stepping up military cooperation and an effort to win an exemption to Trump administration steel and aluminum tariffs.

Bahrain’s Ministry of Interior did not immediately respond to a request for comment.

Giuliani was spotted in Bahrain last December at a royal palace in Manama, meeting with the king of the critical U.S. ally in the Middle East. At the time, the Bahrain News Agency, a government-run news service, reported that Giuliani and King Hamad bin Isa al-Khalifa talked about “Bahraini-U.S. relations,” and characterized Trump’s personal lawyer as the leader of a “high-level US delegation.”

The New York Times reported on that visit in December, and indicated that Giuliani was seeking business with the Bahraini government. But the official establishment of that business relationship has not been previously reported.

Asked by The Daily Beast if he and the king discussed Trump during their December photo op, Giuliani said, “I can’t recall,” and insisted that the discussion was “pretty strictly for us [to] train the police.”

Giuliani said that his firm’s official work with Bahrain “doesn’t involve any lobbying,” and doesn’t involve “giving policy advice” or legal work. “I never discussed Bahrain with anybody in the [Trump] administration including the president,” he said. “[Our] contract has clauses in it that say no lobbying, no foreign representation… I provide you a service. I don’t get involved in trying to solve your problems with the U.S. government.”

Giuliani did not provide The Daily Beast with a copy of the contract as of press time.

In his role as a member of President Trump’s outside legal team, Giuliani isn’t a government employee and thus not bound by laws that bar U.S. government officials (including White House attorneys) from simultaneously working for a foreign government. Still, the distinction hasn’t stopped government ethicists and watchdogs from calling into question the virtue of Giuliani’s foreign work, and pursuit of work in several countries, as he holds such a close working and personal relationship with President Trump.

“Giuliani getting paid by a repressive foreign government while he acts as the president’s personal attorney and advisor looks really bad,” said Brendan Fischer, the director of federal reforms at the Campaign Legal Center. “Even if Giuliani's contract with Bahrain doesn’t include lobbying, it is easy to imagine that the Bahraini government anticipates that giving money to the president’s close advisor is going to help Bahrain promote its interests inside the White House.”

Giuliani’s work for could raise additional eyebrows owing to the country’s highly-criticized human rights record, which has included brutally suppressing protesters and political opposition, allegations of torture committed by the police, and stripping activists of their citizenship. Asked about this track record, Giuliani said he views Bahrain as “one of the more progressive Muslim countries,” and that “I actually think they’re one of the better Gulf countries on human rights,” citing the number of women elected to parliament, for instance.

Giuliani’s work abroad has been a common—and routinely controversial—feature of his time within Trump’s inner sanctum. In addition to scoring a contract with Bahrain, the president’s lawyer has plans to travel to Ukraine on Sunday morning to help encourage investigators in the country to look into both the origins of the Mueller probe and dealings involving Joe Biden.

As The New York Times reported, Giuliani has been actively seeking information on the involvement of Hunter Biden, the former vice president’s son, in an energy company owned by a Ukrainian oligarch. In the Obama era, the former vice president had pushed for the ouster of a Ukrainian prosecutor whose office controlled the investigations of the company, on which Hunter Biden sat on the board.

Giuliani, the president, and various sectors of conservative and pro-Trump media have framed this as the next big Democratic scandal to emerge in a presidential race, on par with Hillary Clinton’s emails. However, a Bloomberg story published this week said that a former Ukrainian official and official documents had presented a timeline that undercut the notion that Biden had intervened on his son’s behalf.

“I’m doing this as part of my role as the president’s lawyer to follow up on [leads],” Giuliani told The Daily Beast. “This is what a defense lawyer does…I’m going after it like a hound dog.” Trump’s attorney also noted that he’s been briefing the president on his progress, and that they’ve had multiple conversations on the topic, though he wouldn’t go into further detail.

Giuliani did say that, based on their private chats, he believed he had the full blessing of President Trump to pursue this private investigation—one now explicitly designed to yield potentially damaging information on one of the president’s a top 2020 challengers.

“The president has expressed the same level of interest in this that he’s expressed in the Steele affidavit,” he said. “I’m just trying to investigate this and trying to figure this all out. I don’t have electronic surveillance, or a grand jury.”

“I’m having too much fun,” Giuliani added, letting out a couple of chuckles. “One day, I’m gonna have to go back to boring lawyer work.”