President Trump’s former lawyer, Michael Cohen, joined by his attorneys Lanny Davis, left, and Michael Monico, leaves the hearing room after testifying before the House Intelligence Committee on Capitol Hill. (Jahi Chikwendiu/The Washington Post)

Michael Cohen had always made problems go away for President Trump. But after the FBI raided Cohen’s home in April, the fixer himself became the issue.

Cohen, who had been in a joint defense agreement with Trump, was squarely in investigators’ crosshairs — with conflicting incentives for whether to keep secret what he knew about potential wrongdoing by the president. Cooperating with prosecutors might win their mercy, but doing so would not let Cohen avoid prison entirely. Sticking with the president might draw prosecutors’ wrath, but Trump could reward him with a pardon.

House and Senate investigators are keenly interested in discussions that took place in those tense months surrounding the raid. Cohen has privately claimed that a pardon was dangled to him by Trump’s representatives, people familiar with the matter say — though he has been unspecific about the timing or substance of the talks.

Two others familiar with the events said it was Stephen Ryan, Cohen’s lawyer at the time, who raised the issue of a pardon. Within weeks of the raid, Ryan and Rudolph W. Giuliani, one of Trump’s personal lawyers, discussed the subject, people familiar with the matter said.

The people spoke on the condition of anonymity to discuss a matter still being investigated. The Wall Street Journal first reported the conversation involving Giuliani.

Ryan did not respond to requests for comment. Giuliani declined to say whether he had a conversation with Ryan or anyone else about a pardon for Cohen, but he said that throughout the investigations of Trump’s campaign, the president has not considered pardons for Cohen or any former associate.

“I can’t confirm or deny whether I had a conversation with any of the attorneys because it’s attorney-client privilege, but what I can say is that I’ve said the same thing to everyone, privately and publicly, which is that the president is not considering pardons at this time,” Giuliani said.

Giuliani added: “The president, as he has said, will not consider pardons during this time. It’s not on his mind. He’s not thinking about it. That doesn’t mean he doesn’t have the legal authority to do it. But at this point, he’s not thinking about it, and it’s not on his mind.”

Although Trump has authority under the Constitution to pardon Cohen, doing so could be politically damaging. Lawmakers also are interested in exploring whether Cohen was offered a bargain tying his cooperation with law enforcement to a pardon — which could be illegal.

In public testimony last week before the House Oversight and Reform Committee, Cohen asserted that federal prosecutors in Manhattan asked him not to discuss a conversation he had with the president or one of his agents after the FBI raided his home. It was not immediately clear, though, whether prosecutors’ interest in the conversation is related to pardons. A spokesman for the U.S. attorney’s office has declined to comment on Cohen’s testimony.

“I do not believe that exercising the constitutional right alone can constitute obstruction,” said Jacob Frenkel, a former federal prosecutor now in private practice at Dickinson Wright. “On the other hand, if the president were to bargain a pardon in exchange for any act that would obstruct the investigation, that would implicate the bribery and gratuities statute.”

Cohen told lawmakers that he had never asked for, nor would he accept, a pardon from Trump. If he were found to have sought a pardon, that could raise questions about the veracity of his testimony.

Lanny J. Davis, a lawyer for Cohen, said, “We stand by the truth of Michael Cohen’s testimony before the House Oversight Committee.”

Cohen ultimately left the joint defense agreement he had with Trump and pleaded guilty in August to several crimes, including violating campaign finance laws by arranging for the payment of hush money to women who alleged they had affairs with Trump. In his plea and in later court hearings, Cohen alleged that he worked in coordination with Trump to break the law. He also pleaded guilty to lying to Congress about the timing of discussions about a possible Trump Tower project in Moscow, saying his aim was to be consistent with Trump’s messaging on Russia. Cohen testified that the discussions ended in January 2016, when in fact, he now admits, they continued into June.

A person familiar with the matter characterized the discussions about pardons involving Cohen — and Cohen’s memory of them — as nebulous. Cohen has not alleged that he was offered an explicit quid pro quo that would tie a pardon to his cooperation with law enforcement, the person said. The person said Cohen felt that Trump’s team was using innuendo and suggestion to imply there would be a benefit for his loyalty.

“It was very vague,” the person said.

The topic of pardons came up when Cohen testified privately last week before the House and Senate Intelligence committees. Precisely what Cohen alleged there remains unclear. Davis has declined to discuss the closed-door session, though he said on MSNBC that Cohen discussed new, potentially “game-changing” information and that it was about “lying and obstruction evidence.” Cohen is scheduled to continue his closed-door testimony before the House Intelligence Committee on Wednesday.

The period after the April raid was particularly fraught for Cohen, who was feeling increasingly isolated from Trump and facing escalating legal and financial concerns. In June, a dispute erupted over his legal debts, which were being paid in part by the Trump Organization, people familiar with the matter said.

The Trump Organization was not at the time paying for all of Cohen’s expenses, but it was footing the bill for a costly review of the enormous cache of documents and audio and video recordings seized during the raid. The argument over legal bills burst into public when it was reported that Cohen would be parting from the Trump Organization’s legal team, including Ryan, that had been representing him.

At the time, Cohen told associates that he was feeling neglected by the president, despite his long-professed loyalty.

The Washington Post reported in July 2017 that Trump had asked advisers about his power to pardon aides, family members and even himself in connection with special counsel Robert S. Mueller III’s investigation into whether his campaign coordinated with Russia to influence the 2016 election. In the wake of that report, Trump seemed to play down his consideration of that topic.

“While all agree the U.S. President has the complete power to pardon, why think of that when only crime so far is LEAKS against us,” he wrote on Twitter at the time.

Trump’s other comments, though, have led his critics to worry he might offer pardons to those who remain loyal to him, while retaliating against those who don’t. After Cohen pleaded guilty in August to various crimes and agreed to cooperate with prosecutors on the same day former Trump campaign chairman Paul Manafort was found guilty after a weeks-long trial, Trump directly contrasted the two men and took a swipe at his own Justice Department, which handled their cases.

“I feel very badly for Paul Manafort and his wonderful family,” Trump wrote. “ ‘Justice’ took a 12 year old tax case, among other things, applied tremendous pressure on him and, unlike Michael Cohen, he refused to ‘break’ — make up stories in order to get a ‘deal.’ Such respect for a brave man!”

A day later, The Post reported that Trump had recently asked his lawyers for advice on the possibility of pardoning Manafort.

Karoun Demirjian contributed to this report.