In between stints as US attorney general for George HW Bush in the early 90s and now for Donald Trump, while making millions as an executive at Verizon and a lawyer at Kirkland & Ellis, William Barr sent hundreds of thousands of dollars to various Republicans and their causes.

Most of those donations made between 1993 and 2019 were occasional at best. But in the lead up to his Senate confirmation hearings for attorney general earlier this year, his giving habits suddenly changed. Barr’s donations became far more frequent, notable for their size, recipients, and possible utility to him. In total, Barr gave $51,000 to the National Republican Senatorial Committee (NRSC)—a group that raises money to help elect Republicans to the Senate—in the months leading up to the Senate’s confirmation of his nomination.

Barr’s ramped up contributions took place over a 5-month period from October 2018 to February 2019 and were substantially different than his prior giving to the NRSC, according to Federal Election Commission (FEC) filings. In the past Barr gave sporadically, once in 2009 and 2011, twice in 2014, one contribution in 2015, and another in 2016. Then, Jeff Sessions’ tenure as attorney general got rocky, and Barr started giving regularly. He donated on a schedule, providing $10,000 every month to the NRSC, on the third of the month, starting in October. That continued until he was confirmed on Feb. 14, 2019, just 11 days after his last contribution.

Neither Jeff Sessions, Loretta Lynch, nor Eric Holder—the three prior attorneys general—made payments to either party committees or senators ahead of confirmation hearings and votes. Holder gave $250 to the Democratic Senatorial Campaign Committee in 2007—two years ahead of his confirmation, and also made a contribution to then California senator Barbara Boxer in 2008. Lynch gave $13,800 to Barack Obama’s election efforts in 2008. She wasn’t nominated to become attorney general until 2014.

Quartz contacted the Department of Justice for comment from the attorney general on the contributions but has not yet received a response. This story will be updated if the DOJ replies to the query.

The donations do not violate FEC rules. The contributions should, however, “raise eyebrows,” says Adav Noti, a senior director at the nonprofit, nonpartisan Campaign Legal Center in Washington DC, a campaign finance watchdog.

“The fact that any one person can give such large amounts to a political party creates a perception problem,” Noti—who was formerly associate general counsel at the FEC— explained. “Someone giving such large amounts to a senatorial committee before their confirmation certainly raises appearance questions.”

The obvious question raised by these donations is whether they were intended to influence a particular outcome. “Maybe it’s a coincidence. Maybe not,” Noti says of the timing and sums. But as long as there was no implicit or explicit quid pro quo, no exchange for an official act—and there is no evidence here that Barr expected or was promised anything in exchange for his donations—there is no legal issue with the contributions. Still, Noti said it is “a flaw in the system” that such large and targeted contributions are permitted.

Barr himself has opined on the matter of prosecutors contributing to political campaigns. In 2017, he spoke to the Washington Post about the prosecutors former special counsel Robert Mueller was hiring as part of his investigation into Russian meddling in the US election and the president’s efforts to thwart that investigation, some of whom had contributed to Democratic causes. “In my view, prosecutors who make political contributions are identifying fairly strongly with a political party,” Barr said.

His own donations are similarly suspect, although the NRSC refunded $30,000 to Barr on Feb. 6, about a week before he was confirmed (Quartz has contacted the NRSC for comment and will update the story with a response). The contributions also indicate that Barr wasn’t quite as reluctant to serve under Trump as has been previously reported. In June, the New York Times wrote that “by all accounts, Mr. Barr was not anxious to join Mr. Trump’s team,” and noted that he declined an earlier opportunity to represent Trump as his private criminal counsel, saying, “I didn’t want to stick my head into that meat grinder.”

However, Barr did in 2018 send an unsolicited 20-page memo to then deputy attorney general Rod Rosenstein regarding Mueller’s investigation, titled “Mueller’s ‘obstruction’ theory.” In it, he wrote, “the Constitution vests all Federal law enforcement power, and hence prosecutorial discretion, in the President.” (Emphasis in the original). Barr stated that there can be “no limit on the President’s authority to act on matters which concern him or his own conduct.” In other words, he wasn’t lying low hoping to go unnoticed but signaling strongly that he would defend Trump.

Indeed, as attorney general, Barr has played a key role in supporting the president. When the Mueller report was completed in March, Barr issued a misleading statement indicating that it cleared the president of obstruction of justice allegations. But when the full 448-page report was released in April, it showed only that Mueller felt constrained by a rule that barred him from charging the president. Mueller actually outlined in the report 11 situations in which Trump tried to thwart his team’s work. The attorney general held a press conference before releasing the full report that again minimized any wrongdoing on the president’s part and spoke of his “non-corrupt motives,” which stood in stark contrast to Mueller’s extensive findings. Barr wasn’t entirely forthright and he seemed to be speaking as if he was the president’s personal defense attorney rather than the nation’s chief prosecutor.

In May, testifying before the Senate about the report, he explained his position, which further illuminated Barr’s view on executive power. “The president does not have to sit there constitutionally and allow [the investigation] to run its course. The president could terminate the proceeding and it would not be a corrupt intent because he was being falsely accused.” Later that same month, Trump authorized Barr to investigate the investigators, and look for “crimes” the president claims were committed by “the other side” when examining his own activities.

It’s become apparent that serving as attorney general under Trump, who shares Barr’s expansive notions of executive power, allows Barr to pursue what his former DOJ colleague Donald Ayer called “his life’s work of creating an all-powerful president.”

According to the New York Times, “Trump’s advisers saw him as the perfect replacement for Attorney General Jeff Sessions when the president forced him out in November: someone with Republican establishment gravitas and distinguished legal pedigree who seemed to share at least some of the president’s views.”

He was reportedly recommended for the role by Abbe D. Lowell, the criminal defense lawyer representing Trump’s son-in-law, Jared Kushner, and daughter Ivanka, among others. Based on the stark increase in Senate Republican donations ahead of his confirmation, Barr was anything but indifferent to the recommendation or the prospect of becoming attorney general again, this time under a like-minded president.

Update: This story was updated to reflect the fact that the NRSC refunded $30,000 in contributions to Barr about one week before his confirmation.