Stan Wawrinka advanced to the U.S. Open quarterfinals after Novak Djokovic retired due to injury in the third set of their fourth-round match Sunday.

Wawrinka moved on with a 6-4, 7-5, 2-1 win.

Djokovic was getting treatment on his left shoulder between the second and third set. The injury has bothered him throughout the tournament, particularly in his second-round match against Juan Ignacio Londero.

Wawrinka broke Djokovic’s serve in the third game of the set before the two shook hands. The crowd booed Djokovic for his decision. 

Following the victory, the 34-year-old Wawrinka signed a fan's head. 

Djokovic was seeded No. 1 and seeking a fourth title in New York.