Now the task is simple for the Archbishop Spalding baseball team.

If the No. 1 Cavaliers are going to win their third straight Maryland Interscholastic Athletic Association A Conference title, they just need to avoid doing something they haven't done all year. Lose two in a row.

Drew Ehrlich's two-out single in the top of the ninth inning scored the go-ahead run in No. 10 Gilman's 6-5 victory over Archbishop Spalding on Tuesday night at Ripken Stadium in Aberdeen. By virtue of the Greyhounds' victory, the teams will play one more time today to decide the champion.

Archbishop Spalding hasn't lost back-to-back games all season and must continue that trend to win its third straight title and fourth since 2011. Gilman won A Conference titles in 1996 and 2010 and is the only team other than Spalding or Calvert Hall to win an A Conference title in the past 11 years.

Ehrlich also pitched the final four innings and earned the win. He gave up the tying run in the bottom of the seventh, but stranded a pair of runners in each of the final three innings.

The teams will play for the title at Loyola Blakefield today at 5 p.m.

Gilman got a pair of extra-base hits off Cavaliers starter Tyler Blohm, who earlier in the day was named the Gatorade Maryland Baseball Player of the Year, in the first two innings. Ehrlich hit a two-out double in the first, but Blohm struck out John Fitzgerald looking to end the inning. The Greyhounds took the early lead in the second when Max Costes hit a solo home run over the 378-foot sign in left-center field. Blohm struck out the side around the home run and had four strikeouts through the first two innings.

Spalding didn't waste time tying the game in its half of the second. Barrett Smith led off with a triple and scored on a wild pitch. Brendan Foley tripled with two outs, but Alex Shafer struck out Fletcher Pack to end the inning.

Gilman took advantage of Spalding miscues and put together a four-run top of the third. Isaac Engermann and Isaiah Braxton reached on errors, with Engermann scoring to put Gilman ahead 2-1. After a single and a fielder's choice, Fitzgerald singled in a run and Pierce Bennett followed with a ground-rule double to right to drive in another run. After Charlie Orlinsky struck out with the bases loaded and one out, Blohm walked Alex Slodzinski to force in another run to make it 5-1.

The Cavaliers missed an opportunity to cut into the lead in the fourth when they had runners on first and second and one out, but broke through for three runs in the fourth to make it a 5-4 game. Nick Vermillion singled in a pair of runs with two outs, and Carter Sears followed with another single to get Spalding within a run heading into the sixth.

Blohm settled down after a shaky first three innings and retired nine straight from the fourth through sixth innings. He walked Braxton to lead off the seventh, but struck out Fitzgerald and Carter Sears threw out Braxton trying to steal third to end the inning. Blohm went seven innings, gave up the five runs on five hits and struck out 12.

With the Cavaliers down to their final at-bat in the bottom of the seventh, LaVale Hodges drew a one-out walk and scored on Smith's double to tie the game. After an intentional walk to Vermillion, Ehrlich struck out Sears and Brendan Foley to send the game to extra innings.