CHAPEL HILL—The last weekend of the regular season mattered very little for the Blue Devils’ postseason prospects, but Duke finally proved it can consistently compete with the best in the nation—if it makes an improbable ACC championship run this week to get to the NCAA tournament.

The Blue Devils used a stellar bullpen to beat No. 3 North Carolina 8-4 Thursday night at Boshamer Stadium in Chapel Hill before falling 3-2 in 10 innings Friday and 9-7 Saturday. Duke ended the season losing eight of its 10 ACC series, but has showed signs of life in May with two wins against Georgia Tech and the unlikely victory against the Tar Heels.

“We’re coming together. We’re competing really well,” Blue Devil head coach Chris Pollard said after Saturday’s game. “I like the way this team is playing heading into next week.”

Duke (28-27, 12-18 in the ACC) capitalized on North Carolina’s mistakes to win the first game of the series after loading the bases on two walks and a hit-by-pitch with no outs to start the fifth inning. Max Miller pulled a two-run single down the left-field line to tie the contest at four, and Kennie Taylor scampered home on a wild pitch to put the Blue Devils in front.

That was all the help Duke’s pitching staff needed against a vaunted Tar Heel lineup with five .300 hitters. Senior Kevin Lewallyn entered in the fourth inning and retired all eight batters he faced after starter Mitch Stallings ran into trouble his second time through the order—North Carolina (44-11, 23-7) scored all four of its runs in the fourth inning.

Chris McGrath then worked a hitless seventh inning and Nick Hendrix only conceded one baserunner in the final two frames to finish off the win, with the Blue Devils adding insurance runs in the sixth and the ninth to pad the lead.

“Those guys are growing up,” Pollard said of his bullpen, which had more than its share of struggles early in the year. “I’m really proud of them.”

Duke stayed in the game with another impressive pitching performance Friday night, going toe to toe with Tar Heel ace J.B. Bukauskas, who is expected to be a top-10 pick in next month’s MLB draft.

The Blue Devils got to Bukauskas early, with freshman Jimmy Herron drawing a leadoff walk and coming around to score on a two-out infield single by Taylor in the top of the first. Herron then doubled Peter Zyla home in the second, continuing a red-hot series after he went 4-of-6 in Thursday’s opener.

But Bukauskas settled in and did not allow a hit for the next five innings, retiring 12 straight batters at one point.

“That’s why he’s going to be a number one draft pick,” Pollard said. “He’s a very tough competitor, and he got better and got stronger as the game went.”

North Carolina manufactured a run to cut the deficit in half in the third inning when Duke shortstop Zack Kone bobbled a sharp grounder, and Pollard removed starting pitcher Ryan Day after three innings and 60 pitches to keep him fresh for the ACC tournament.

Senior Karl Blum came out of the bullpen to toss three hitless innings, but returned to the mound for a fourth inning after already throwing a season-high 50 pitches. Michael Busch doubled off him to lead off the seventh and advanced on a wild pitch before Hendrix entered the game and induced a game-tying grounder to second off the bat of Brian Miller.

Neither team threatened again until the 10th inning, when the top of the Blue Devils’ order put two runners on against Josh Hiatt before Taylor stranded them with a swinging strikeout.

“We had some chances there late where we had some free offense and we were one hit away from taking the lead,” Pollard said. “Hiatt was just really, really good.”

The Tar Heels’ hits found the holes in bottom of the 10th, with Logan Warmoth lining a single to center and Ashton McGee poking a bloop single opposite field to shallow left-center to put the winning run on third base with no outs.

Duke got one out on a force at home after an intentional walk loaded the bases, but Tyler Lynn’s soft chopper to Kone playing in at shortstop was enough to score McGee for the walk-off win.

“That’s just baseball,” Pollard said. “With the bases loaded there, we executed great. I was really proud of Chris McGrath, thought he did a great job staying in the moment and executing pitches.”

The rubber match was not quite as close, as North Carolina jumped out to a 7-1 lead through four innings before the Blue Devils started to chip away.

Trailing by four entering the ninth inning, Duke hit four singles to put the tying run on first base, but Max Miller’s harmless groundout ended the series.

The Blue Devils will now turn their attention to the ACC tournament. As the No. 9 seed, they will face No. 5 seed Clemson Tuesday night and No. 4 seed Virginia Thursday morning needing to win both to keep their season alive and advance to Friday’s semifinals.