Updated

Feeling a need to clear his conscience following last week's synagogue massacre in Pittsburgh, and in the midst of his own legal troubles, President Trump’s former personal lawyer Michael Cohen said in a recent interview that he recalled several instances in which his former boss used racist and anti-gay language during one-on-one conversations.

In the interview with Vanity Fair, Cohen said he wanted to express himself in the wake of a tragedy in which 11 people were gunned down during Saturday services, and looking ahead to Tuesday’s election, which he called "the most important vote in our lifetime.”

According to Cohen, during a discussion at Trump Tower after returning from a 2016 campaign rally, Cohen observed that the rally crowd was overwhelmingly white when he watched it on television.

“I told Trump that the rally looked vanilla on television," Cohen said. "Trump responded, 'That’s because black people are too stupid to vote for me.’”

A few years earlier, after Nelson Mandela’s death, Trump allegedly said to Cohen: "'Name one country run by a black person that’s not a s---hole,’ and then he added, ‘Name one city,'"

The alleged exchange mirrors comments attributed to Trump earlier this year about some African nations and other developing countries.

Cohen also said he recalled a conversation with Trump when they were traveling through a Chicago neighborhood.

“We were going from the airport to the hotel, and we drove through what looked like a rougher neighborhood,” Cohen told the magazine. “Trump made a comment to me, saying that only the blacks could live like this.”

During the first season of “The Apprentice,” white contestant Bill Rancic and black Harvard-educated investment banker Kwame Jackson went head-to-head.

"There’s no way I can let this black f-- win,” Cohen recalled Trump explaining about why he couldn't pick Jackson, with Trump allegedly using a homophobic slur.

Former Trump aide Omarosa Manigault Newman also accused her former boss of using the n-word after their falling out and her publication of a book, the Washington Post reported. She also shared a secret recording of black Trump staffers seeming to admit that he probably had used the n-word at one time or another.

Cohen, who pleaded guilty in August to campaign-finance violations, and tax fraud, said he wishes he would have left the Trump Organization sooner, but he didn’t because he grew numb to the offensive language.

“I should have been a bigger person, and I should have left,” he said. “I truly thought the office would change him.”

In August, Cohen changed his political affiliation from Republican to Democrat to distance himself "from the values of the current” administration," he said.

Cohen is scheduled to be sentenced Dec. 12.