Novak Djokovic showed signs of rust but still defeated Gilles Muller to reach the third round of the Rogers Cup in his first singles match since making a shock Wimbledon exit.

Djokovic said he took the opportunity to "regroup" after suffering a sensational defeat to Sam Querrey in the third round of Wimbledon at the start of this month.

The Serb was in doubles action at the Rogers Cup on Tuesday and saw off Muller 7-5 7-6 (7-3) in Toronto a day later to book a third-round encounter against Radek Stepanek.

World number one and top seed Djokovic was by no means at his best, with Muller breaking his serve twice on Centre Court, but got the job done in an hour and 43 minutes against his opponent, who is ranked 37.

Three-time Rogers Cup champion Djokovic, eyeing a 30th ATP Masters 1000 title, needed just the solitary break to take the first set but made hard work of seeing out the match.

He was twice a break up in the second set, but lost the advantage on both occasions and eventually had to fight back from 3-1 down in a tie-break to book his place in round three.

Dominic Thiem and Querrey had to retire from their second round matches against Kevin Anderson and David Goffin respectively due to injury.