Newt Gingrich, a vocal surrogate for Donald Trump’s presidential campaign, turned critical Friday, following a wildly controversial week for the Republican nominee.

“I think what Trump’s got to understand is he’s either got to sing ‘I’ve Got To Be Me’ or he’s got to learn a new song, ‘I’ve Got To Be President,’” Gingrich told Fox News’ Sean Hannity in an interview. “They’re not the same song. He’s got to become much more disciplined.”

Gingrich -- who said he had believed Trump “had really turned a corner” with his temperament -- berated the real estate mogul for his last several days, when Trump entered into a nasty feud with former Miss Universe Alicia Machado, attacking her on Twitter and urging Americans to “check out [her] sex tape.” (There is little evidence of any such “sex tape” existing of Machado, though a Buzzfeed investigation found Trump once made a cameo appearance in an adult film produced by Playboy.)

Get Breaking News Delivered to Your Inbox

“This last week I think has been, frankly, a lost week, a week which has hurt him, which has shaken his own supporters,” Gingrich said.

He added, referencing the tweetstorm against Machado blasted out in the middle of the night, “And you can’t tweet at 3:00 in the morning, period. There’s no excuse ever, not if you’re going to be president of the United States.”

The former House speaker warned that such mistakes would greatly hurt his chances in November.

“He’s really got to decide -- and I think it’s very important to understand this. If he’s got to be himself, then he may well not win,” he said. “If he’s willing to grow into the role of president, then he may win. In fact, I think he will win.”

Clinton, who took up Machado’s defense over the last week, has attacked Trump over similar concerns.

This is...unhinged, even for Trump. A few notes. https://t.co/WURWs6aJ5f — Hillary Clinton (@HillaryClinton) September 30, 2016

What kind of man stays up all night to smear a woman with lies and conspiracy theories? — Hillary Clinton (@HillaryClinton) September 30, 2016