ORONO, Maine — After losing its first back-to-back America East games this season, the University of Maine’s baseball team was desperate to salvage the third game of its series against the University of Maryland Baltimore County on Sunday at Mahaney Diamond in Orono.

UMBC had beaten the Black Bears by identical 9-8 scores on Friday and Saturday.

With staff ace Colin Fitzgerald unable to pitch in the series due to back spasms, freshman Gianni Gambardella took the ball from head coach Nick Derba and tossed a gem on Sunday afternoon.

The 6-foot-2, 185-pound righthander from West Haven, Connecticut threw seven shutout innings, allowing just five hits, and junior lefty Tyler Nielsen didn’t allow a hit or run over the final two innings as UMaine triumphed 9-0.

It was UMaine’s first shutout win of the season and the Black Bears improved to 24-17 overall and 14-4 in the conference. UMBC is 24-21 and 13-8, respectively.

UMaine now needs just two wins in its last six league games to finish first or second and earn a first-round bye for the America East Tournament on May 24-27 in Binghamton.

On Sunday, Gambardella struck out three and walked two while throwing 64 strikes among his 103 pitches. All five hits were singles.

He surrendered singles to Christian Easley and Justin Taylor to open the game but initiated a 1-6-3 double play and induced a groundout to get out of the jam. He pitched out of a bases-loaded, one-out jam in the seventh by getting a strikeout and fly ball out.

“I was just trying to pump strikes. The guys were making all the plays behind me. I’m lucky to have that good of a defense behind me,” said Gambardella, who is now 5-2. “I was locating my four-seam fastball well and my change-up worked pretty good, too.”

“His fastball was probably in the upper 80s and he spotted it really well which is why he was able to put up a zero,” said UMBC senior catcher and leading hitter Tony Krueger. ‘“He also mixed in his change-up.”

UMaine scored the only run it needed in the first inning when Jeremiah Jenkins roped a two-out double to right and scored, two walks later, on a Myles Sargent hit off pitcher Joe Pucek’s glove.

UMaine broke the game open with four runs in the sixth.

Sargent doubled to left and Ryan Turenne walked.

Pucek was replaced by Sam Daniels and Matt McElwain put down a sacrifice bunt.

Following a groundout back to the mound, Jake Rainess ripped a sinking line-drive single to left out of the glove of the sliding Easley to score two.

“He hung me a slider and I got the barrel [of the bat] on it,” said Rainess.

UMaine junior second baseman Quinn McDaniel followed with an inside-the-park homer on a ball that was jarred out of the glove of center fielder Justin Taylor when he hit the fence.

It was McDaniel’s 10th homer of the season. The blustery wind was blowing in all day.

“On a different day, that ball is way gone but I’m glad it dropped,” said McDaniel, whose first ever homer at UMaine was an inside-the-park job.

UMaine added three more in the seventh and one in the eighth.

“This was a must win game in every sense,” said Derba. “If we didn’t win, there would be concern about what kind of team we are.”

Sargent had a double and two singles for UMaine. McDaniel homered and doubled and Rainess  had a pair of singles.  

The Black Bears squandered leads in the Friday and Saturday losses as the Retrievers pounded out 23 hits and UMaine committed six errors.

On Saturday, Rainess’ three-run homer with two outs in the eighth inning gave the Black Bears an 8-6 lead heading into the ninth.

But closer Justin Baeyens was touched up for three runs in the ninth as UMBC pulled out the win.

A lead-off walk, Dawson Baracani’s base hit and Easley’s bunt single loaded the bases for UMBC in the ninth.

Taylor’s fielder’s choice delivered the first run, Krueger’s base hit tied it up and, following a walk, Luc Lavigueur relieved Baeyens and Leewood Molessa drove in the winning run with a sacrifice fly.

Connor Kelly came on to pitch the bottom of the ninth for UMBC and retired the side in order for his seventh save of the season and second in as many days.

Taylor had three singles and two runs batted in for UMBC. Luke Trythall doubled and singled and Easley and Baracani had two base hits each. Krueger had two RBIs.

Rainess’ homer was his 13th of the season and Sargent belted a two-run homer, his sixth of the season.

On Friday, the Retrievers erased a 6-4 deficit with a five-run sixth-inning rally and Kelly pitched out of a bases-loaded jam in the eighth and then stranded two runners in the ninth.

Ryan Scott came on in relief of starter Caleb Leys in the sixth and walked the first man he faced.

One out later, Easley tied the game with his second homer of the season.

Scott walked the next man and Colton Carson came on to replace him.

A catcher’s interference call put runners on first and second and an Ian Diaz single and an ensuing error on center fielder Colin Plante scored both runners.

Matt Ryan’s two-out single scored Diaz with what proved to be the winning run.

UMaine loaded the bases with one out in the eighth and Kelly relieved Ben Craig.

Nick White greeted him with an RBI single but Kelly struck out Jeff Mejia and induced Colby Emmertz to foul out to end the inning.

Easley had two doubles to go with his homer and Diaz had two singles.

White doubled and singled for UMaine and McDaniel, Jenkins and Plante had two singles each.

Up next: UMBC will play Towson on Tuesday at 6 p.m. and UMaine will play a non-conference game at Merrimack in North Andover, Mass. on Wednesday at 6 p.m.