President Donald Trump says he doesn’t want his finances investigated, but he just appointed a top White House staffer who has given tens of thousands of dollars to an official doing just that.

Trump appointed Anthony Scaramucci as the White House’s new communications director on Friday, capping a tumultuous six months among the president’s press team. In the first on-camera press briefing in nearly a month on Friday afternoon, the New York financier and media personality extolled the success of the president’s agenda, and said his job would be to communicate how great Trump is doing.

Though Scaramucci was a prominent Trump supporter during the later legs of the 2016 campaign—after his first two preferred candidates, Wisconsin Gov. Scott Walker and former Florida Gov. Jeb Bush, withdrew—he has also backed some of Trump’s most prominent antagonists.

Chief among them is New York Attorney General Eric Schneiderman, a Democrat who has waged pitched battles against the president through investigations aimed at Trump’s finances and those of his campaign, his family, and companies he owns or has associated with. Schneiderman has also pursued legal complaints against multiple Trump administration policy programs.

In May, the AG’s office escalated its legal efforts against the president. Schneiderman brought on one of New York’s top public corruption investigators, a former prosecutor in the office of Preet Bharara, whom Trump dismissed from his post as the U.S. Attorney for the Southern District of New York in March.

Schneiderman’s most prominent legal offensive against the president targeted Trump University, a defunct real-estate sales seminar program. Days after Trump’s election, the “university” paid $25 million to settle fraud charges brought by the AG’s office.

Schneiderman had laced into Trump the year before over what he dubbed “straight-up fraud” committed by Trump University. “If you look at the facts of this case, this shows someone who was absolutely shameless in his willingness to lie to people, to say whatever it took to induce them into his phony seminars,” he said.

Those comments came in June 2016. The following month, Scaramucci donated $40,000 to Schneiderman’s reelection campaign—to this day the seventh largest contribution to the campaign from an individual other than the Schneiderman himself. The year before, Scaramucci had donated another $25,000 to the AG’s re-election effort.

Schneiderman’s office declined to comment on Scaramucci’s new role on Trump’s team. Scaramucci and the White House press office did not respond to requests for comment.

Schneiderman has continued being a thorn in Trump’s side during the first half-year of his presidency. He is reportedly investigating the finances of former Trump campaign chairman Paul Manafort, who is the subject of a parallel FBI probe into alleged Russian election meddling.

Schneiderman joined a group of other state attorneys general this year in a lawsuit against Trump’s ban on immigration from six Muslim-majority nations. He is suing Trump’s Energy Department over delays to federal energy efficiency standards. And in June, Schneiderman announced that he was examining the Eric Trump Foundation, the charitable vehicle run by the president’s son, after a Forbes report suggested that it had steered charitable funds to the Trump Organization.

In some ways, Scaramucci’s backing for an official so hostile to his new boss mirrors the political record of Trump himself. The president has lavishly supported a number of Democrats, most of them New York officials whose support, Trump has said, he needed to enlist for business reasons.

One of those officials was Schneiderman himself, to whom Trump contributed $12,500 in 2010. He has also donated to prominent Democrats including Senate Minority Leader Chuck Schumer, former Senate Democratic Leader Harry Reid, and disgraced former Rep. Anthony Weiner.

But Scaramucci’s contributions also underscore the gap between some of his professed policy positions and those of the president. The president’s new top communicator has expressed support for gun control policies, while Trump has feted the National Rifle Association and pledged to uphold the Second Amendment. Scaramucci has called for policies to combat climate change; Trump recently withdrew the U.S. from a major international climate accord.

Despite those differences, Scaramucci suggested on Friday that he will faithfully support the president’s agenda, even where it conflicts with his own policy preferences.

“I’m a team player… I believe you have to subordinate yourself to the greater good of the team,” he said. “Here’s the commitment I’m making to you and the American people and the president: I’m here to serve him in the West Wing.”

For supporters of the same officials that Scaramucci has backed financially, that likely means little in the way of policy agreement even from an official that may share some of their views.

James Freedland, a Democratic operative and former top adviser to Schneiderman, was unsparing in his criticism of Scaramucci’s decision to take the White House post.

“No one with any integrity would take a job that requires lying your ass off on a daily basis for a boss who demands total loyalty but offers nothing but humiliation in return,” Freedland said in an email. “This is a career-ending, dignity-destroying job, but I wish Mr. Scaramucci the best of luck.”