Donald Trump lauded Bernie Sanders Friday — for providing him with the ammunition to go ­after Hillary Clinton.

The presumptive GOP presidential nominee described Clinton, his likely Democratic rival in the general election, as a “disaster” and told a wildly cheering crowd in Fresno, Calif., that even her voice grates on him.

“I can’t stand her screaming into the microphone,” Trump said, holding his hands to his ears during the raucous rally, where several hecklers were escorted out and protesters clashed with Trump supporters outside.

Although the real-estate mogul and the Vermont socialist Sanders are political opposites, Trump found one patch of common ground — their attacks on Clinton.

“Hillary is a disaster, folks. She has bad judgment,” he said, referring to the former secretary of state’s e-mail scandal.

“That was said by Bernie Sanders . . . He’s given me a lot of my best lines. I mean, he has given me such great lines on her, and if I say it, they’re gonna say, ‘That’s not a nice thing to say,’ so I always refer to Bernie Sanders,” Trump quipped.

Sanders, who has vowed to fight to the end in the Democratic presidential primary, lashed out at Clinton last month.

‘He’s given me a lot of my best lines. I mean, he has given me such great lines on her, and if I say it, they’re gonna say, “That’s not a nice thing to say,” so I always refer to Bernie Sanders.’ - Donald Trump

He charged that she wasn’t “qualified” to be president for accepting millions of dollars from corporate interests, for her vote in favor of the “disastrous war in Iraq,” and for backing “every disastrous trade agreement” proposed by the Obama administration.

Trump, who has been criticized for making offensive remarks about women, also suggested that Clinton doesn’t have a presidential persona.

“Do I look presidential?” he said to roars.

“Do you think Hillary looks presidential?” he said to boos.

Despite invoking Sanders to undercut Clinton, Trump pulled the plug late Friday afternoon on a debate with the Vermont socialist.

Trump had flirted with the idea since Wednesday night and said as late as Friday morning that he “very badly” wanted a face-off with Sanders.

Hours later, he issued a statement backing out.

“Based on the fact that the Democratic nominating process is totally rigged and Crooked Hillary Clinton and Deborah Wasserman Schultz will not allow Bernie Sanders to win, and now that I am the presumptive Republican nominee, it seems inappropriate that I would debate the second-place finisher,” Trump said.

That was a letdown to tech millionaire Richie Hecker, who ­offered to put up the $10 million for charity that Trump demanded ­before he would debate.