BUENOS AIRES, Argentina (AP) -- Leonardo Mayer defeated Joao Souza in the longest Davis Cup singles match ever, converting his 11th match point to win 7-6 (4), 7-6 (5), 5-7, 5-7, 15-13 and keep Argentina's hopes alive against Brazil in their first round series on Sunday.

Mayer needed 6 hours, 42 minutes to beat Souza, which is also longer than the record for a clay-court match on the ATP tour. It leveled the best-of-five series at 2-2, setting up a decisive match between Federico Delbonis and Thomaz Bellucci. That decider was suspended because of darkness after Delbonis won the first set 6-3 and was set to resume Monday.

The previous longest singles Davis Cup match had been John McEnroe's win over Mats Wilander in 1982, which lasted 6 hours, 22 minutes. Since the tiebreaker era, the longest singles match was Horst Skoff's win over Wilander in 6 hours, 4 minutes in 1989.

The ATP record on clay was Fabrice Santoro's win over Arnaud Clement in 6 hours, 33 minutes over two days in the first round of the 2004 French Open.

The longest tennis match in history remains John Isner's win over Nicolas Mahut in 11 hours, 5 minutes over three days at the 2010 Wimbledon. The longest Davis Cup match was a doubles played in 2013 when Tomas Berdych and Lukas Rosol defeated Marco Chiudinelli and Stanislas Wawrinka in 7 hours, 2 minutes in the first round.

After squandering 10 match points, Mayer finally broke Souza's serve while leading 14-13. The 29th-ranked Argentine dropped to the ground as the crowd and his teammates loudly celebrated.

''We are a team, you need to have faith,'' Mayer said, crying, in the post-match interview.

The fifth set alone lasted 2 hours, 30 minutes.

Mayer had three match points at 5-4, two at 9-8, and four at 12-11, all on Souza's serve. He squandered the 10th in the final game before finally sealing the win.

The 75th-ranked Souza served for the match at 6-5 but was not able to capitalize on his opportunity as he was broken right back.

Brazil is trying to advance to the Davis Cup quarterfinals for the first time since 2001, when three-time French Open champion Gustavo Kuerten was still playing.

Argentina made it to the semifinals in 2013 but dropped to the World Group playoff last year.

Argentina reached at least the semifinals every year since 2010 before being upset by Italy in the first round in 2014.

Brazil and Argentina are both seeking their first Davis Cup title. Argentina was runner-up four times: 1981, 2006, 2008 and 2011. Brazil has never made it to the final. It reached the semis in 1992 and 2000.

The winner will play Serbia in the quarters.