DURHAM, N.C. -- 18th-ranked North Carolina staged one of the most dramatic comebacks in school history, bouncing back from losing the first set in all six singles matches, to rally past No. 5 Duke 4-3 on Wednesday afternoon.

After starting the season at 3-4, Carolina has now won nine of its past 10 matches to improve to 12-5 overall and 9-1 in the ACC. Duke fell to 18-4 overall and 7-2 in the league.

"First of all I want to congratulate Duke. They played a great match. This is what makes college tennis so great. It ended up being a five-hour match," said UNC head coach Sam Paul. "I'm so proud of my guys for fighting back. I don't think we've ever been in a situation where we lost six first sets and then come back and won the match. That certainly hasn't happened in the 23 years since I've been at Carolina."

The nine conference wins equal the most regular-season victories in league play in Tar Heel history. UNC also won nine league matches in 2007 (9-2), in 2008 (9-1) and in 2011 (9-2). Carolina will seek its school record 10th ACC regular-season win when it plays at Maryland on Sunday at 12 noon.

After winning the doubles point, the Tar Heels proceeded to struggle in the opening phase of singles, losing the opening set on all six courts. Duke was able to notch fairly quick straight set wins at the No. 3, No. 4 and No. 5 spots to take a 3-1 lead and appeared poised to avenge last year's regular-season loss to the Tar Heels. At that stage no one would have thought it would end up being a five-hour thriller.

But Jose Hernandez, Oystein Steiro and Brennan Boyajian all rallied to give the Tar Heels the three points necessary to stage the comeback. UNC has now won three of the past five regular-season meetings against Duke. Carolina beat Duke 4-3 in Chapel Hill last year and Wednesday's win gives the Tar Heels back-to-back regular-season wins in the rivalry for the first time since April 12, 1995 (4-3 UNC in Chapel Hill) and April 11, 1996 (4-3 UNC in Durham).

"I'm so proud of my team for hanging in there. Jose had a huge win to beat the No. 4 player in the country," said coach Sam Paul. "Oystein stepped up for us at No. 6 with a big come-from-behind win. And I can't say enough about Brennan Boyajian for clinching the match for us."

UNC is now 4-0 this season in matches decided by 4-3 scores and all four wins have come in ACC play. Boyajian has clinched three of those wins.

Carolina claimed the doubles point with wins at No. 1 and No. 2 doubles. Hernandez teamed with Joey Burkhardt to clinch the point at the No. 1 spot as the 30th-ranked UNC duo defeated 28th-ranked Henrique Cunha and Chris Mengel of Duke 8-1. The Tar Heel tandem is 10-2 this year and 9-1 in ACC play. At No. 2 doubles, Brennan Boyajian and Cameron Ahari improved to 4-0 overall since they teamed up a couple of weeks ago. The duo beat Cale Hammond and Raphael Hemmeler of Duke 8-5.

After the Blue Devils claimed singles wins at No. 5 (Raphael Hemmeler), No. 4 (Fred Saba) and No. 3 (Torsten Wietoska), the Tar Heels began their comeback with 33rd-rated Jose Hernandez's win against fourth-ranked Henrique Cunha at No. 1 singles by a 2-6, 6-1, 7-5 count. A year ago, Hernandez had also clinched the match for the Heels with a three-set win against Cunha.

On court six, freshman Oystein Steiro dropped the first set to Jason Tahir in a tiebreaker but battled back to win the final two sets 6-4, 6-3. Boyajian then finished off his own rally at No. 2 singles against 26th-ranked Chris Mengel. After Mengel won the first set 6-4, Boyajian took the second set in a tiebreaker 7-2. He then took the final set 6-4, winning the final two games after it was all tied at 4-4.

Both Hernandez and Boyajian improved to 8-2 this season in ACC dual match play while Steiro, the freshman from Norway, is now 7-3 in ACC dual matches.