David Pecker
David Pecker testified at Donald Trump's criminal trial.
(Photo by Brian Ach/Getty Images for Take A Shot!)

Former National Enquirer publisher David Pecker became the first witness at Donald Trump's hush money case in Manhattan.

Pecker, a longtime Trump friend, was questioned about the paper's use of "checkbook journalism," which includes paying sources for stories.

Pecker said he "gave a number to the editors that they could not spend more than $10,000" on a story without getting his approval.

He said he had the final say over celebrity stories - and the editorial philosophy, the Associated Press reported.

"The only thing that is important is the cover of a magazine," Pecker said.

The 72-year-old now acts as a consultant, including for the company that owns the National Enquirer.

Trump's team didn't learn that Pecker was the first witness until Sunday afternoon, former president's attorney Emil Bove told CNN.

Prosecutors are only giving brief notice on witnesses to limit Trump's attack the witnesses on social media.

Pecker was granted immunity in exchange for his testimony.

During opening statements, prosecutor Matthew Colangelo told the jury the is "about a criminal conspiracy and a cover-up."

Trump's attorney Todd Blanche told the jury, "President Trump is innocent" and that "none of this was a crime."

Other prosecution witnesses expected to be called are former press aid Hope Hicks, Trump's former "fixer" Michael Cohen and Daniels.

It's unclear if the defense would call on Trump to testify, which would allow the prosecution to cross-examine him.

Trump made payments to kill any coverage of an alleged affair Trump had with adult film star Stormy Daniels.

The accounting of those payments is the basis for the prosecution's case against Trump.

Trump is charged with 34 felonies for allegedly falsifying business records to cover up payments made to Daniels. He could face up to four years in prison if convicted.

The former president has repeatedly denied any wrongdoing in the case.

A recent poll finds that just 35 percent of U.S. adults say Trump did something illegal in the case.