Former Vice President Joe Biden said House Speaker Nancy Pelosi is “masterful” in how she’s dealing with the four lightning-rod freshman Democratic lawmakers in her caucus.

The Democratic front-runner weighed in on the continuing squabble between Pelosi and the group of four progressive congresswomen, praising Rep. Alexandria Ocasio-Cortez in particular.

“I think Nancy is masterful,” he told MSNBC in an interview that aired Tuesday.

“And that doesn’t mean I don’t respect her. I do,” he said about Ocasio-Cortez, who, with Reps. Rashida Tlaib, Ilhan Omar and Ayanna Pressley, have been dubbed “the Squad.” “I think the freshmen, particularly AOC, is smart as hell. Really bright and really a value added to the party in terms of her pushing the edges and pushing and pushing.​”

But he said Pelosi has to keep the entire caucus moving in the right direction.

​”You’ve got to get them moving. And no one — I mean it’s ironic. I heard someone criticize Nancy for not being liberal enough. I mean, come on,” he said.

Biden, who represented Delaware in the US Senate for decades, said Ocasio-Cortez and her colleagues should consider what’s the greater good in the House.

​”AOC is brilliant and the other three women we’re talking about are really smart, but they are the exception rather than the rule,” Biden said. “If you listen to the guys and women in your business, they say, that’s the majority of people who got elected. We need that kind of energy, but that’s not the majority of the Democrats who got elected last time.”