James McGee was unable to keep his New York fairytale going at the US Open.

The Dubliner achieved his dream of competing in the main draw at a grand slam thanks to a tremendous run through qualifying at Flushing Meadows.

McGee, ranked 194, has spent his whole career until now fighting to make a living on the lowest rungs of the professional game.

A first-round clash against Kazakh Aleksandr Nedovyesov, also ranked outside the top 100, appeared to offer the opportunity for further heroics and McGee made a great start.

The 27-year-old's family and friends had flown out from Ireland to watch him and he broke serve in the opening game before going on to take the first set.

But Nedovyesov fought back to win the second and third sets and move a break ahead in the fourth.

McGee recovered that and forced a tie-break but it was his opponent who came out on top in a 4-6 6-2 6-1 7-6 (7/3) victory.

Nevertheless, McGee leaves New York with his head held high and his wallet weighed down by a cheque for more than $35,000. 

Andy Murray defied his own body and Dutch opponent Robin Haase to reach the second round. 

In conditions that were hot but not extreme, the Scot struggled badly with cramp during the last two sets but survived to win 6-3 7-6 (8/6) 1-6 7-5.

Haase, who was also troubled physically, served for the fourth set but could not take advantage of Murray's discomfort.

It was another dramatic match on Louis Armstrong Stadium for Murray, who has endured some of his least comfortable moments in grand slams on Flushing Meadows' second court.

The 27-year-old, who next meets German qualifier Matthias Bachinger, said: "I started cramping at the beginning of the third set.

"It was not particularly comfortable. I tried to hang around as best I could and managed to get through.

"I need to work out why that happened today because it shouldn't happen after an hour and 45 minutes, even though it was hot."

Wimbledon hero Nick Kyrgios came close to being thrown out of the tournament for swearing.

The 19-year-old Australian, who stunned Rafael Nadal in the fourth round at the All England Club, eventually made headlines of the right sort with a 7-5 7-6 (7/4) 2-6 7-6 (7/1) victory over 21st seed Mikhail Youzhny.

Kyrgios had already been given two code violations for his bad language in the third set and a third at the start of the fourth set saw him penalised a game.

One more incident would have resulted in Kyrgios being defaulted but the teenager successfully kept his tongue in check thereafter.

Kyrgios said: "I guess it was just heat of the moment. I was frustrated the way I was playing and it was just all that sort of stuff. It was just an outburst and hopefully I will be able to control that the next time I play.

"It comes from having high expectations most of the time. I have been an emotional player most of my career. Maybe I will be able to manage it in the future. It's a work in progress. It's something that's always been there."

Experienced Russian Youzhny made the quarter-finals here last year and represents another impressive scalp for Kyrgios, who next meets Italian Andreas Seppi.

Youzhny served to make it two sets all but Kyrgios steeled himself to break back and dominated the fourth-set tie-break.

Ninth seed Jo-Wilfried Tsonga was given a scare by Argentina's Juan Monaco but recovered to win 6-3 4-6 7-6 (7/2) 6-1.