World number one Novak Djokovic was made to fight in his first round match at the US Open on Monday, eventually downing Jerzy Janowicz 6-3, 5-7, 6-2, 6-1.
Djokovic, who is aiming to win his third grand slam of the year after triumphing at the Australian Open and Roland Garros, was facing Janowicz for the first time.
After a tight start to proceedings, Djokovic broke Janowicz in the sixth game to take a 4-2 lead and held and went on to clinch the set 6-3.
In the second set it was Janowicz who found himself 4-2 up after breaking Djokovic in the sixth game. The top seed broke back and brought himself level at 5-5, but Janowicz kept his cool and broke once more to claim the set and level matters at a set apiece.
Spurred into action after dropping the second set, Djokovic broke Janowicz right off the bat in the third set before grabbing another break in the fifth game to race out to a 4-1 lead from where he claimed the set 6-2.
Djokovic looked to be back to his best in the fourth set and he broke Janowicz three times to triumph in two hours and 37 minutes.
Fifth seed Milos Raonic also advanced to the second round after easing past Dustin Brown 7-5, 6-3, 6-4.
Raonic, who reached his first-ever grand slam final at Wimbledon in July, will face Ryan Harrison in the second round after the American beat Adrian Mannarino 6-4, 7-6 (5), 6-3.
Ninth seed Jo-Wilfried Tsonga, 15th seed Roberto Bautista Agut, 18th seed Pablo Cuevas and 20th seed John Isner also progressed to the second round.
Earlier in the day, fourth seed Rafael Nadal defeated Denis Istomin 6-1, 6-4, 6-2 , while seventh seed Marin Cilic beat Rogerio Dutra Silva 6-4, 7-5, 6-1.
The biggest upset of the day was produced by Kyle Edmund who triumphed over 13th seed Richard Gasquet in straight sets.