Scott McClellan, a former press secretary to President George W. Bush, criticized the tone of the Republican presidential campaign at a lecture at Hofstra University yesterday and said his former boss’ legacy was “overshadowed” by his decision to invade Iraq.

McClellan, who was press secretary from 2003 to 2006, said in both the Democratic and Republican parties, “there’s been a movement” toward candidates perceived to be against the establishment: Vermont Sen. Bernie Sanders on the Democratic side, on the Republican side, front-runner Donald Trump.

McClellan said that Trump has failed to “take the opportunity to build upon that movement” which has reached a “ceiling.” His rhetoric “is not going to build a majority Republican party by any means.”

He said that since Bush, there are “more ideological people in office than you used to have that don’t even want to talk to the other side.”

After he left the White House, McClellan in 2008 released a tell-all memoir, “What Happened,” which angered some members of the Bush administration.

But McClellan yesterday defended Bush’s presidency, saying Bush should be judged for other issues beyond Iraq, including initiatives in Africa.

advertisement | advertise on newsday

McClellan, Seattle University’s vice president for communications, also spoke of his early experiences in the Bush White House — including one of his toughest days, Sept. 11, 2001, when he shepherded reporters traveling with Bush in Florida after the terrorist attacks in New York, Washington and Pennsylvania.

McClellan recalled the former president’s appearance at Game Three of the 2001 World Series on Oct. 30.

Bush, who was to throw out the first pitch at Yankee Stadium, asked Yankees shortstop Derek Jeter if he should pitch from the mound or in front of it. Jeter told Bush, who had been a managing general partner of the Texas Rangers, “if you don’t stand on the mound, this is New York. They’re going to let you know it.”

Former Vermont Gov. Howard Dean, a Democrat, joined McClellan and Ed Rollins, a former adviser to President Ronald Reagan, on a panel yesterday morning.

In an interview, Dean acknowledged similarities between his insurgent 2004 campaign for president and Sanders’ campaign. “They’re better organized, and they also have gotten a lot further than we did,” said Dean, a former chairman of the Democratic National Committee who supports Hillary Clinton. Dean and Rollins are senior presidential fellows with the Peter S. Kalikow Center for the Study of the American presidency.