NEW YORK - Canada's Frank Dancevic fought for more than three and a half hours before losing a marathon to Joao Sousa 7-6 (6), 3-6, 6-2, 4-6, 7-6 (2) to exit in his opening match at the U.S. Open on Wednesday.

Dancevic, from Niagara Falls, Ont., gave everything he had as day turned into evening before taking the painful loss.

It was the first five-set match for the 29-year-old since 2011 Wimbledon.

Portugal's Sousa, ranked 38th, finally moved into the second round in the final-set tiebreaker, as he smashed back a weak Dancevic defensive lob to secure the win.

An exhausted Dancevic, ranked 135th, finished the battle with 50 winners and 51 unforced errors, pounding down 17 aces and converting on four of 14 break chances.

His defeat leaves fifth seed Milos Raonic, from Thornhill, Ont., as the last Canadian left in the men's competition. Wimbledon finalist and seventh seed Eugenie Bouchard, from Westmount, Que., is into the second round in the women's draw.