ASSOCIATED PRESS Jim Acosta gives a thumbs up after a federal court appearance that resulted in the return of his White House press pass that the Trump administration had revoked last November.

CNN chief White House correspondent Jim Acosta believes that President Donald Trump’s frequent attack on journalists as the “enemy of the people” began as an “act” to target a scapegoat and whip up anger — and more support for himself — among his backers, The Guardian reported.

Acosta discusses Trump’s attitude toward reporters — and his own contentious relationship with the president — in his upcoming book: “The Enemy of the People: A Dangerous Time to Tell The Truth in America,” an advanced copy of which was obtained by the newspaper.

Acosta was told by sources that Steve Bannon, serving as the White House chief strategist at the time, came up with the “enemy of the people” line for Trump at the start of his presidency.

The reporter recalled a strange exchange with former White House communications director Hope Hicks early in Trump’s presidency that made him question Trump’s real position on journalists. Hicks told him the president thought Acosta was “very professional” that day — the same day Trump had publicly attacked Acosta as a purveyor of “fake news.”

Acosta writes in the book: “When he called us ‘fake news’ it was, in his mind, an act.”

But what may have begun as a strategy became a fierce, frightening, relentless attack on the media that ignites a fury against reporters at Trump rallies, Acosta recounts, according to The Guardian.

Acosta has had several tense exchanges with Trump. He had his White House press pass temporarily revoked late last year when he challenged the president on the “migrant caravans.”

Attacked occasionally for what some see as a bias against the president, Acosta, according to The Guardian, writes in his book: “Neutrality for the sake of neutrality doesn’t really serve us in the age of Trump.”