After a smooth first inning, Zach Thompson hit a rough patch in the second. Maryland’s right-hander had walked Brady Harju and fallen behind 2-0 to Fox Semones, prompting a visit from pitching coach Corey Muscara.

But Semones would win the battle, drilling a 2-2 pitch for a game-tying home run. And two pitches later, Josh Jones put James Madison ahead for good with a solo blast.

Thompson would settle down, but those early blasts were the difference Wednesday in College Park as the Dukes (10-6) knocked off the Terps, 4-2, to end Maryland’s four-game winning streak.

“I thought we pitched the ball plenty well to win today,” coach Rob Vaughn said, “but we were just not near good enough offensively to win a game against a good team.”

[Read more: Often leaning on its top 3 hitters, Maryland baseball now seeing more from bottom of order]

In the first inning, a Terps’ offense that scored 35 runs in their weekend sweep of Bryant continued to roll. Randy Bednar clubbed a one-out double to left-center field and scored on Maxwell Costes’ RBI single to deep left field. James Madison left-hander Liam McDonnell then loaded the bases and plunked Ben Cowles with a 2-1 pitch to bring in Maryland’s second run of the frame.

But that would be all for the Terps (10-5), and the Dukes responded in the second. After a leadoff walk, Semones tied the game on a two-run home run out to left-center. Two pitches later, Jones walloped a longball of his own to give James Madison the lead. Then with two outs and a runner on third, Thompson uncorked a wild pitch, letting Kyle Hayes cross the plate for the Dukes.

After the early offensive explosions, though, both teams settled into a pitcher’s duel. McDonnell did not allow a hit in the next two frames before being lifted. In three innings, the left-hander allowed two earned runs and three hits while striking out two and walking two.

For the Terps, Thompson allowed just one hit in the next two frames but was pulled after four innings as both teams turned Wednesday’s contest into a bullpen game. Maryland’s right-hander allowed four earned runs and four hits while striking out two and walking one.

“There was just that one inning, but I thought we really attacked hitters well,” right-hander Elliot Zoellner said of the pitching staff.

[Read more: “Burke is a baller”: Sean Burke’s gritty mound presence boosts Maryland baseball]

As the bullpens took over, both offenses continued to come up empty. Grayson Jones fooled the Terps’ hitters, while Connor Staine pitched 1 ⅔ hitless frames before walking two in the sixth.

But Sam Bello came in and escaped James Madison’s only real threat since the second inning by blowing a 1-2 fastball by DaVonn Griffin.

While Maryland’s pitching was cruising, its bats were ice cold. Jones tossed three shutout innings in relief, picking up the win.

“From the second inning to the sixth inning, we coasted through the game offensively and were really bad,” Vaughn said.

After Jones was replaced to start the seventh, the Terps mounted their only real threat since the first inning.

Austin Chavis reached on an error to start the frame and moved to third with two outs. Then, Bednar walked and Costes was hit by a pitch to load the bases for designated hitter Bobby Zmarzlak. The freshman worked a 2-2 count against Lliam Grubbs but flew out to deep left field, stranding three runners.

And with that momentum, the Dukes planted the dagger. Grubbs retired six of Maryland’s last seven hitters to cap off the save, finishing the game by getting Bednar to fly out to right field. For the Terps, it capped a poor showing by their normally explosive offense, a blip they hope to correct before they face TCU this weekend.

“We weren’t putting in quality at-bats,” Bednar said. “We have to do a better job getting deeper in counts and getting hard contact.”