NEW YORK -- Milos Raonic had trouble at the baseline, but still earned his first U.S. Open victory.

The Thornhill, Ont., native overcame 55 unforced errors including 15 double faults on Tuesday to defeat Santiago Giraldo of Colombia 6-3, 4-6, 3-6, 6-4, 6-4.

Raonic, the No. 15 seed, earned his 34th victory of the season in a match that lasted well over three hours.

"I'm just happy with the outcome and that I managed to make the most of that moment and just find a way to win," said Raonic. "Everything else I've got to hope gets better in the next round."

Raonic had 30 aces, but struggled with unforced errors and converted on only a third of his dozen break points.

"I don't think I struggled with my serve that much in a long, long time. A lot of double faults, and it wasn't just one double fault per game," said Raonic. "I double-faulted consistently a couple times in a row, and that made my job a lot more difficult and it gave him a little bit more freedom at the same time."

Raonic did not play at the U.S. Open in 2011 as he recovered from hip surgery. In 2010 as a qualifier, he was beaten by Australian Carsten Ball in his debut at a major.

On Tuesday, Raonic found himself down 2-1, but tied the match with a break in the final game of the fourth set as Giraldo fired wide.

The match finished with a Raonic break of Giraldo on a forehand error from the Colombian.

He will play Paul-Henri Mathieu of France for the first time in the second round of the tournament.

Toronto's Daniel Nestor and partner Max Mirnyi of Belarus are scheduled to play Americans Steve Johnson and Jack Sock later Tuesday in the first round of the men's double's tournament.