Maryland baseball had its best up. Illinois’ ace was out, and coach Rob Vaughn’s squad was seemingly in a good position for a comeback.

But it didn’t pan out. The Fighting Illini dominated on the mound, beating the Terps, 2-0, Friday night. The loss snapped their six-game winning streak.

Maryland’s Nick Dean and Illinois’ Andrew Hoffmann went pitch-for-pitch in a laser-tight matchup. And the Terps’ retooled lineup struggled.

All but one Maryland hitter struck out at least once, with the new additions to the lineup struggling the most. Hoffmann made nothing easy and became familiar with three up, three down innings, allowing just five baserunners in his 7.2 innings. He did not allow a run on 112 pitches.

“[Pitching coach Corey Muscara] said we faced some really good arms this year,” Vaughn said. “But if I could pick one guy out of everybody we faced to take and put on our team, it would be Hoffmann.”

[Searching for its third straight series win, Maryland baseball takes aim at Illinois]

If it weren’t for a Cal Hejza RBI single in the third, the Terps might not have felt so much pressure to score as the game progressed. But with a strong swing on a Dean sinker, Hejza gave the Fighting Illini a prevailing 1-0 lead.

With each passing inning, it became clearer that Maryland needed to take advantage of every on-base opportunity. It only had a handful of those throughout the game as Illinois’ ace racked up 12 strikeouts.

“We have to be grittier,” Vaughn said. “We’ve got to acknowledge the fact we went out to get too many baseballs, we left the zone too often, we got into two-strike counts too often, we didn’t compete enough.”

Hoffmann turned in one of the best performances of any pitcher the Terps have faced all season. And the final two innings saw an increase in urgency at the plate as Vaughn’s group needed a run.

“He just gave you nothing, it was suffocating,” Vaughn said.

[Maryland baseball’s retooled lineup helped it sweep Minnesota]

A Riley Langerman single gave Maryland a little excitement while ending Hoffmann’s night, but it didn’t amount to much. Cole Kirschsieper did the job for the Fighting Illini, and the Terps had one more chance to equalize.

A wild pitch extended Illinois’ lead to two as Dean was relieved by Elliot Zoellner for the closing outs. Dean went 7.2 innings, his second-longest start of the season. He allowed two earned runs and five hits while striking out just one.

But his strong start hung in the balance. The heart of Maryland’s batting order — which was a collective 0-for-8 for the game entering the ninth — was due up.

Those batters could not come through. After Matt Shaw worked a leadoff walk, Kirschsieper set down the next three hitters, ending the game by getting Matt Orlando to fly out.

“We just got to be grittier, and this group has responded every time we challenged them, so I don’t have any doubt they’ll do the same thing tomorrow,” Vaughn said.