The Mets didn’t need Nolan McLean to be a savior Saturday, but it sure didn’t hurt that the rookie assumed such a role.

A team desperate for even decent starting pitching got the bonus package, as McLean — in his major league debut — helped the Mets, without much thunder offensively, bury their worries for an afternoon.

With that injection of energy, the Mets ended a three-game skid with a 3-1 victory over the Mariners at Citi Field. It was only their third victory in their past 17 games.

McLean, a top organizational pitching prospect, pitched 5 ¹/₃ scoreless innings in which he allowed two hits and four walks with eight strikeouts.

Nolan McLean reacts after getting out of the third inning during the Mets’ Aug. 16 win. Jason Szenes for the NY Post

Nolan McLean throws a pitch during the Mets’ win against the Mariners on Aug. 16. Robert Sabo for the NY Post

The Mets pieced together the rest, which included scarcely used Edwin Díaz pitching two innings for his 24th save in 26 chances.

McLean, 24, relied mostly on his signature sweeper, but showed six pitches, topping out at 95.5 mph with his four-seam fastball.

The rookie provided a boost for a rotation that last week demoted struggling Frankie Montas to the bullpen and watched David Peterson and Sean Manaea struggle in subsequent starts.

The series rubber game is Sunday at the Little League Classic in Williamsport, Pa.

Much of the sellout crowd booed as manager Carlos Mendoza went to the mound to remove McLean in the sixth.

McLean had just struck out Julio Rodríguez — on pitch No. 91 — after walking Cal Raleigh to begin the inning.

Nolan McLean reacts after exiting the game during the Mets’ Aug. 16 win. Jason Szenes for the NY Post

McLean exited to a standing ovation.

Gregory Soto entered and escaped the inning, striking out Eugenio Suárez for the final out after Raleigh had stolen second and reached third on Francisco Alvarez’s throwing error.

Twice after his departure, McLean was shown in the dugout on the huge outfield screen and received further adulation from the crowd.

It’s likely his next start will come in Atlanta next weekend.

McLean walked J.P. Crawford and Cole Young — the No. 8 and 9 hitters in the lineup — to begin the third.

But after a visit from pitching coach Jeremy Hefner, the right-hander returned to pounding the strike zone.

Randy Arozarena struck out and after Raleigh singled to load the bases, Rodríguez hit a chopper that McLean fielded behind his back to start an inning-ending 1-4-3 double play.

Pete Alonso reacts after hitting an RBI double during the Mets’ win against the Mariners on Aug. 16. Jason Szenes for the NY Post

The Mets struggled to generate offense against Mariners starter Bryan Woo, who allowed one earned run on six hits with eight strikeouts and two walks over six innings.

Francisco Lindor brought in the game’s first run with a third-inning double.

Brett Baty singled leading off the frame before Lindor, who blasted two homers the previous night, hit a line drive into the right field corner for his 70th RBI this season.

Nolan McLean reacts from the dugout during the Mets’ Aug. 16 win against the Mariners. Jason Szenes for the NY Post

Nolan McLean walks toward the dugout during the Mets’ Aug. 16 win. Robert Sabo for NY Post

Dominic Canzone singled leading off the fifth and reached second on Alvarez’s passed ball before McLean retired the next three batters without the runners advancing.

The Mets loaded the bases in the sixth on a walk to Cedric Mullins after Jeff McNeil and Alvarez singled in succession, but Ronny Mauricio was retired to end the threat.

Soto gave the Mets a boost by retiring all five batters he faced.

Brett Baty scores during the Mets’ win against the Mariners on Aug. 16. Robert Sabo for the NY Post

It was an eighth straight appearance by Soto since his July arrival from Baltimore in which he did not allow an earned run.

The left-hander has recorded more than three outs in back-to-back outings.

Juan Soto’s sacrifice fly in the seventh gave the Mets a 2-0 lead after Baty singled leading off the inning and stole second.

Delivering insights on all things Amazin’s

Sign up for Inside the Mets by Mike Puma, exclusively on Sports+

Thank you

Lindor’s single put runners on second and third with nobody out. Lindor got thrown out at the plate attempting to score on Brandon Nimmo’s single.

Pete Alonso greeted Carlos Vargas with an RBI double on the right-hander’s first pitch that extended the lead.

Suárez homered in the ninth against Díaz to get the Mariners their run.