Rick Gates, the right-hand man to President Trump’s former campaign chairman, returned to the witness stand Thursday, testifying in the trial of prominent Washington lawyer Gregory B. Craig.

Gates — who previously served as the government’s star witness against his former business partner Paul Manafort — testified about his interactions with Craig in their work on behalf of the Ukrainian government.

Federal prosecutors accuse Craig of lying to Justice Department officials who were investigating whether Craig should have registered as a foreign agent for work he did in coordination with Gates and Manafort, a former political adviser to Ukraine’s president at the time.

Craig, 74, a former Obama White House counsel, has pleaded not guilty to one count of making false statements, and his attorneys say he is being unfairly prosecuted for actions that at the time did not appear to fall under the requirements of the Foreign Agents Registration Act.

The law requires Americans to publicly register when they are paid to influence U.S. policy for foreign governments. The key question for jurors is not whether Craig was required to register, but whether he lied to federal investigators about alleged public relations work on behalf of Ukraine that would have triggered the registration requirement.

In federal court in Washington on Thursday, Gates testified that Craig was an integral part of his team’s public relations strategy for enhancing Ukraine’s reputation, and that Craig initiated a briefing with a handpicked New York Times reporter at the direction of Ukraine.

But Craig’s attorneys painted Gates as untrustworthy, as he acknowledged in court that he lied on his tax returns and to federal investigators, deceived his former business partner and circumvented Craig’s orders. The admissions echoed Gates’s testimony in federal court in Alexandria in Manafort’s trial that ended with Manafort’s conviction for bank and tax fraud.

Gates’s credibility is a test of the government’s case against Craig — and critical to Gates’s future. He is awaiting sentencing after pleading guilty in February 2018 to conspiracy and lying to the FBI as part of former special counsel Robert S. Mueller III’s probe of Russian interference in the 2016 election.

He faces a sentence of 57 to 71 months, according to federal guidelines, and has been a cooperating witness in hopes of receiving a lesser term.

Gates, 47, said he has been largely unemployed since his indictment, and he mostly appeared relaxed during more than four hours on the witness stand as he told jurors that he has met with federal investigators more than 40 times in the past two years. He will be sentenced by U.S. District Judge Amy Berman Jackson, the same judge presiding over Craig’s trial.

Craig was the first prominent Democratic figure to be charged in Mueller’s investigation, and the case against him centers on work he did at his former law firm — Skadden, Arps, Slate, Meagher and Flom. He was hired to produce an independent report in 2012 for Manafort client Viktor Yanukovych, the Ukrainian president at the time.

The report was to determine whether the trial and incarceration of Yanukovych’s political rival, Yulia ­Tymoshenko, was a fair proceeding, with the report part of a broader campaign by the Ukrainian government to win favor in the West. The report largely concluded that Tymoshenko’s trial was fair but was critical in some measures.

The nature and extent of Craig’s involvement in promoting the report with journalists is central to the government’s case.

Prosecutors argue that Craig didn’t want to register as a foreign agent because it would undermine the perceived independence of the report that Skadden was paid more than $4 million to produce and might tarnish Craig’s reputation and future prospects for political roles. The government says Craig intentionally concealed from Justice Department officials that he had a hand in trying to influence journalists and to publicize the report’s findings on behalf of leadership in Ukraine.

Craig’s attorneys have insisted his interactions with journalists did not represent advocacy for Ukraine coordinated with the government, but rather efforts to correct the record about the report.

Gates testified Thursday that Craig twice suggested sharing an advanced copy of the report with New York Times reporter David Sanger — initially at a meeting with Gates and Manafort at Craig’s D.C. law office and then in September 2012 at a meeting at the Harvard Club in New York attended by Gates and Manafort. Craig said they could count on Sanger for a tough but credible article “that would help with our PR strategy,” Gates testified.

“Did you expect the on-record interview to be a glowing endorsement?” asked prosecutor Fernando Campoamor-Sanchez.

“No, we did not,” Gates said.

The prosecutor noted that Craig is quoted in the Times article published on Dec. 12, 2012, before the report was officially released, with the headline: “Failings Found in Trial of Ukrainian Ex-Premier.”

“Had he been asked to do so on Ukraine’s behalf?” the prosecutor asked.

“Yes,” Gates answered.

Craig’s attorney Paula M. Junghans presented Gates with copies of his media rollout plans that included a line about Skadden Arps’s concerns about participating in public relations. She portrayed the strategy involving Craig as speculative rather than based in reality.

Although Craig mentioned Sanger as a go-to, she noted — and Gates confirmed — that the memo says, the law firm “cannot pro­actively lead in communications given their restrictions by FARA registration and disclosure,” a reference to the act.

Gates acknowledged under questioning that “there was reluctance on Mr. Craig’s part to take on a lot of the actions we outlined.”

This week, jurors heard testimony from the public relations consultant Manafort hired to work on the dissemination and release of the Skadden report. Jonathan Hawker also testified that Craig played a key role in strategizing the media plan before the report’s release.

Under cross examination, Craig’s attorney William Murphy pointed to emails in which Craig said Skadden would not take the lead in communicating the findings of the report.

“I have been clear that we cannot run close to the FARA line” Craig said in an email.