Updated

Buenos Aires, Argentina (SportsNetwork.com) - Leonardo Mayer outlasted Joao Souza in an epic five-set rubber to pull host Argentina into a 2-2 tie with South American neighbor Brazil in their best-of-five Davis Cup battle in Buenos Aires. The war of attrition lasted a new Davis Cup-record 6 hours, 42 minutes.

The previous Davis Cup record for longest match occurred back in 1982, when John McEnroe outlasted fellow legend Mats Wilander in 6 hours, 32 minutes in a United States-Sweden quarterfinal matchup St. Louis.

In a battle of Friday's opening singles winners on Sunday, Mayer survived Souza 7-6 (7-4), 7-6 (7-5), 5-7, 5-7, 15-13 on the red clay at Tecnopolis to force a fifth and deciding match between Argentine Federico Delbonis and Brazilian Thomaz Bellucci. Delbonis was inserted in place of Carlos Berlocq.

Mayer broke Souza in the 28th game of the fifth set to finally come out on top.

The winner in Buenos Aires will move on to face Serbia in July's quarterfinals.

Saturday's doubles saw a Brazilian tandem of Marcelo Melo and Bruno Soares defeat an Argentine duo of Berlocq and Diego Sebastian Schwartzman, while Friday's opening singles resulted in wins for Souza and the 29th-ranked Mayer.

Argentina is 5-2 all-time versus Brazil in Davis Cup play.