KALAMAZOO, Mich. -- Fourth-ranked Emory will play for the program's sixth national championship on Wednesday, earning a berth into the NCAA Division III title game after upsetting top-ranked Amherst 5-4 in a marathon semifinal match on Tuesday.

Emory, now 18-4 this season, will take on Williams for the NCAA championship on Wednesday. The Ephs reached the title match with a 5-1 win against second-ranked Claremont-Mudd-Scripps on Tuesday.

The Eagles took the early advantage in Tuesday's match against Amherst, striking first in doubles play with an 8-2 win from junior Brenna Kelly and freshman Emma Taylor at third doubles against Safi Aly and Caroline Richman. Amherst evened the match with a win at second doubles, as Jen Newman and Zoe Pangalos withstood a come-back attempt from senior Jordan Wylie and freshman Madison Gordon to win 9-7. However, Emory ended the doubles matches with a lead, as junior Gabrielle Clark and freshman Annette Sullivan claimed the final point with an 8-6 win against former NCAA doubles champions Jordan Brewer and Gabby Devlin in the first match.

Amherst rebounded, winning the first two singles matches decided to take a 3-2 lead. At third singles, Sue Ghosh defeated Wylie 6-2, 6-3 while Newman followed at second singles with a 6-2, 6-4 win against freshman Beatrice Rosen. Emory evened the score at three behind Clark at first singles, who defeated Brewer 7-6 (5), 6-3.

The other three matches, the results of which awarded one of the two teams a trip to the championship, each proved to be a nail-biting three-set affair. At the fifth singles match, Gordon fell to Devlin to put Amherst a point away from clinching. After winning the first set 6-2, Gordon dropped the second set 2-6 to her opponent and trailed 5-2 in the third set. Gordon fought back, winning four of the next five games to force a third-set tiebreaker, but eventually fell 7-6 (3).

Down 4-3, Emory needed wins from both freshman Marissa Levine at fourth singles and Kelly at sixth singles to avoid their third consecutive trip to the consolation match. Kelly was the first to abide, defeating Pangalos in three sets to even the team score at four. Kelly took the first set by a 7-5 score, but dropped the second set 4-6. However, Kelly bounced back with a strong 6-3 third-set victory to claim the individual win.

With the score tied at four, all eyes turned to the fourth singles match, where Levine dropped the first set 3-6 to Richman, but bounced back with a thrilling 7-6 (6) second-set tiebreaker win. Energized by the tiebreaker victory, Levine secured the Eagles' come-from-behind win with a dominating 6-1 win in the third set to clinch the team win.

When the final point was tallied, the match totaled more five hours in length, including a brief rain delay during doubles play. Amherst ended its 2013 season with a 20-3 record as the Eagles avenged a 5-4 loss to the Jeffs earlier in the season.

Emory will play in its eighth NCAA championship match and its first since the 2010 season. The Eagles are 5-2 in championship matches, including wins in 1996, 2003, 2004, 2005 and 2006.