When Maryland baseball designated hitter Josh Maguire came to the plate in the ninth inning with the bases loaded in a tied game, the Terps found themselves in an unlikely position to win.

Entering the ninth, Illinois left-hander Andy Fisher had limited Maryland to just one hit, and no baserunner made it further than second base.

But a leadoff single by shortstop AJ Lee and a two-bagger from Randy Bednar doubled the hit total from the preceding eight frames, and a pair of sac bunts, a hit batter and a walk gifted the Terps a way back into Friday’s series opener.

Illinois right-hander Garrett Acton, who replaced Fisher to get the final two outs, threw a 1-2 pitch to Maguire in the dirt, and the ball got away catcher Jeff Korte. With the leading runner racing to the plate, Korte overthrew Acton, and two runs came in to give Maryland a 4-2 series opening win over the Illini.

The last time right-hander Hunter Parsons toed the rubber — in Maryland’s series opener against Indiana last weekend — the senior threw eight scoreless innings in a 2-0 win. But after walking off the mound following another solid eight innings, in which he allowed six hits, three walks and two runs, the Terps had a chance to come back.

Although Parsons held the Illini (19-9, 0-4 Big Ten) in check, Maryland’s struggling offense — which hasn’t exceeded six runs since March 20 against Elon — continued to be ice cold.

Fisher didn’t give up a hit until the fifth inning. The redshirt senior threw eight scoreless innings, as the Terps (14-14, 2-2) repeatedly came up empty at the plate. His nine punchouts tied a career high.

With Maryland unable to pressure Fisher, a two-run second inning from Illinois looked to be the difference early.

Right fielder Jack Yalowitz, third baseman Grant Van Scoy and Korte led off the second inning with three straight singles. And back-to-back sacrifice flies by left fielder Michael Michalak and shortstop Ben Troike to center and right, respectively, gave Illinois a 2-0 lead.

Parsons has a propensity to attack the strike zone — he entered Friday with just 11 free passes in 49 innings — and Illinois took advantage in the second by swinging early in the count. The singles by Van Scoy and Korte and the sac fly by Michalak came on first-pitch swings, and the sac by Troike came on an 0-1 count.

But the Terps didn’t relinquish hope. And after a little help from sloppy Illini defense plated four runs in the final frame and a dominant final inning by right-hander John Murphy closed the door, his sixth save, Maryland ended its three-game skid by beating Illinois, 4-2, to open the series.