PITTSBURGH — Since the only November night in franchise history, when hubris pushed him toward an ill-fated attempt to save a whole team on his own, the game had exerted total control over Matt Harvey.

It had scarred his body, cracked his confidence and convinced nearly everyone that he was but a shell of his former self. But when the game raised its hand to strike on Sunday night, it was Harvey who regained control.

“That’s what I’ve been waiting for for a long time,” he said after a 7-2 victory over the Pirates in which he finally resembled a pitcher who hadn’t been seen since the 2015 World Series.

The breakthrough came in the fifth inning with Harvey’s back to the wall, precisely the kind of spot in which he has so often folded. Consecutive two-out hits brought to the plate Gregory Polanco, who already had homered in the game.

Harvey did not blink. Instead, he aimed a nasty slider at the back foot of Polanco, who looked helpless as he flailed at an unhittable pitch. On the mound, Harvey punctuated the moment with a small fist pump.

“When I needed that strikeout when I have in the past, it was there,” Harvey said after allowing one run in six innings in his most encouraging start of the season. “That was definitely a positive for me.”

advertisement | advertise on newsday

The 21-27 Mets’ best chance to recalibrate their wayward season is to bring back the luster to their banged-up starting rotation. That won’t happen unless Harvey rediscovers his form.

In that regard, he took a great leap forward, his task made easier with plenty of support.

Asdrubal Cabrera banged a two-out, two-run double off the fence in the fourth. In the fifth, Jose Reyes singled home a run ahead of Jay Bruce’s two-run double. Curtis Granderson drilled a two-out RBI single in the sixth. With two outs in the seventh, Lucas Duda homered for the second consecutive day.

By then, a sweat-soaked Harvey had taken his seat on the bench, where he savored his best start since his no-show controversy kicked off a trying month.

“This has got to be a big step for his confidence,” said Terry Collins, who raved about Harvey’s command and the best curveball he’s seen from him in more than a year.

Mets videos

Harvey’s struggles have flowed from that fateful moment in franchise history in 2015. The self-proclaimed Dark Knight has been less superhero and more journeyman.

Entering his outing on Sunday, Harvey had made 26 starts in the last two seasons, going 7-13 with a 5.03 ERA. Those numbers place him directly in line with a former Mets righty who has since become a journeyman: Mike Pelfrey.

In that time, Harvey’s body has been forced to endure the rigor of surgery for thoracic outlet syndrome. He took the mound Sunday night with a 5.36 ERA.

But pitching coach Dan Warthen has raved about Harvey’s stuff. He noted that the biggest hurdle in a return to form has been mental. The challenge facing Harvey, he said, is simply regaining “100 percent trust of his stuff.”

The Pirates first tested that trust in the fourth. With runners on second and third, Harvey threw a fastball by Francisco Cervelli and used another to freeze Jordy Mercer.

advertisement | advertise on newsday

“Really, it’s a huge, huge positive for me to execute those pitches tonight,” Harvey said.

An inning later, Polanco came to the plate with two aboard, just one good swing away from cutting into a four-run lead. Though Polanco already had hit one slider over the fence, Harvey did not hesitate to throw another, this one a more wicked version in the dirt. His trust was warranted.

“I’ve always known that I was going to get back to where I wanted to be,” Harvey said. “Obviously, it’s just taken a little bit of time and it’s been frustrating for me. But a lot of the work has been paying off.”

In the dugout later on, Collins placed his hand on Harvey and reminded him of the step he had just taken. After the game, a crown was waiting on Harvey’s chair, the team’s reward to the most valuable player of the night.

Harvey placed it on his head and cracked a smile, for a moment softening the brooding image he has worked to maintain. But at that moment, his only concern seemed to be savoring a moment he’d been waiting for since that long-ago November night.

advertisement | advertise on newsday

“I didn’t think I was going to wear it the whole year,” Harvey said. “But it’s nice. It’s a good feeling.”