BALTIMORE — Andrew Casali doubled with one out in the 12th inning and later scored on an infield single by Mark Esposito as the University of Maryland Baltimore County outlasted the University of Maine for a 7-6 America East baseball victory Sunday afternoon at Alumni Field.

The Retrievers (5-10, 3-3 AE) earned the series win after the teams split a doubleheader on Saturday. UMaine took the first game 4-1 behind a complete game by Tommy Lawrence but the Retrievers won the nightcap 2-1.

On Sunday, the Black Bears (8-16, 1-2 AE) committed back-to-back errors with two outs in the ninth inning, opening the door for two UMBC runs to tie the game. Coach Steve Trimper’s UMaine squad committed four errors in the contest.

Jonny Dierks (1-1) worked 5⅔ innings of four-hit shutout ball with six strikeouts and no walks to pick up the win for UMBC. Charlie Butler (1-2) gave up four hits and three runs, only one of which was earned, while striking out three and walking five.

Vince Corbi (two doubles) and Connor Hax (double, single) each knocked in two runs for the Retrievers, while Jake Barnes collected three of their 15 hits. They left 14 men on base.

UMaine was led by Scott Heath of Westbrook, who hit a double and two singles with two RBIS. Brian Doran (RBI) doubled twice and singled while Alex Calbick (double, single) and Sam Balzano of Portland (two singles) each knocked in a run.

The Bears finished with 15 hits and left 15 men on the basepaths.

UMaine led 6-3 heading to the eighth, but the hosts tallied a run in the eighth before tying it in the ninth. Kevin Lachance drew a leadoff walk and moved up on a groundout.

Butler struck out Esposito, but Nick Naumann reached on an error by third baseman Shane Bussey, then Barnes got aboard on a fielding error by shortstop Troy Black, allowing the first run to score.

Hax followed with an RBI single through the right side to make it 6-6.

In the pivotal 12th, Casali doubled down the left-field line with one out, advanced on a wild pitch and, two walks later, scored on Esposito’s infield hit to shortstop.

In Saturday’s opener, Lawrence (2-4) allowed only one run on eight hits through nine innings. He struck out eight and walked one.

Jonathan Salcedo doubled and singled to pace UMaine. Loser Joe Vanderplas (0-2) allowed two runs on five hits in six innings.

Andrew Casali doubled and singled for UMBC.

Maine broke a scoreless tie in the fifth after two were out. Salcedo singled to right field and advanced to second on a wild pitch. He moved to third when Balzano singled through the left side and scored on Colin Gay’s single to right.

UMBC tied it in the sixth when Lachance singled up the middle, stole second and scored on Hunter Dolshun’s single to right.

Maine took the lead for good in the seventh as Bussey was hit by a pitch, moved to third on Salcedo’s double to left center and, after Balzano walked, scored on a double-play grounder.

The Bears added an insurance run in the eighth when Calbick doubled and later scored on an error. In the ninth, Balzano reached on a passed ball and scored when Black doubled to right.

In the second game, Mac Gill spaced five hits with three strikeouts and one walk, going the distance in the seven-inning contest.

Lachance doubled and singled with an RBI to pace the hosts, while Salcedo doubled and Gay stroked a run-scoring single for UMaine.

Starter Shaun Coughlin (1-2) took the loss for the Bears, allowing six hits and two runs over 4⅓ innings.

UMBC took a 2-0 lead in the third inning when Corbi walked and Lachance doubled to left-center. Lachance scored when Dolshun doubled.

Maine scored in the seventh. Bussey led off with an infield single and took second on an error on Balzano’s fielder’s choice. After a balk, Gay plated Bussey with a groundout.

Jeff Gelinas worked 1⅔ hitless innings of relief for the Bears.