Michael Cohen, former personal attorney to Donald Trump, testified against the ex-president on Monday in his New York criminal hush money trial.

While Cohen has been cooperating with government prosecutors for several years, his appearance on the witness stand is an extraordinary moment in his long relationship with Trump — a man for whom Cohen once said he would “take a bullet.”

Under questioning from prosecutor Susan Hoffinger, Cohen described how he cajoled, aggressively bullied and outright lied to do whatever Trump asked of him.

“The only thing that was on my mind was to accomplish the task, to make him happy,” he said. “I did ... what was needed in order to accomplish the task.”

When Trump first hired him, Cohen earned $525,000 a year doing things like calling vendors and renegotiating bills to a fraction of their original cost or threatening media outlets over negative stories about his boss.