She’s the Republicans’ whipping gal — but President Trump said Saturday that he endorses Nancy Pelosi wholeheartedly as House speaker.

“I can get Nancy Pelosi as many votes as she wants in order for her to be Speaker of the House,” Trump tweeted.

“She deserves this victory, she has earned it,” he tweeted. “But there are those in her party who are trying to take it away. She will win!”

He later called her “tough” and “smart,” gushing to reporters, “I like her, can you believe it?”

He also told reporters that it’s “a good time” for a government shutdown — if he doesn’t get funding for Congress for a wall along the border with Mexico.