DUBAI, United Arab Emirates -- Defending champion Novak Djokovic needed less than an hour to advance at the Dubai Championships on Wednesday, while Roger Federer faced a struggle to seal his place in the quarterfinals.

Top-seeded Djokovic swept to a 6-1, 6-3 win over 51st-ranked Roberto Bautista Agut of Spain in just 57 minutes, but fourth-seeded Federer had to see off a serious challenge from 48th-ranked Radek Stepanek of the Czech Republic before coming through 6-2, 6-7 (4), 6-3.

"I have done really well today from the first to the last point," Djokovic said. "There was no major ups and downs, especially with the serve that helped me to win comfortably my service games, a lot of free points."

In the first set, Djokovic raced to a 5-0 lead before Bautista Agut held serve to win his only game in the set.

The only hiccup Djokovic had in the second set was when serving for the match at 5-2. He dropped his serve in that game but broke serve in the next to close out the match.

Djokovic will play sixth-seeded Mikhail Youzhny, who beat British wildcard recipient James Ward 6-1, 7-6 (3).

Federer came into his two hour, eight minute match with a 12-2 winning record over Stepanek. He's now won their last nine meetings dating back to the 2008 Rome quarterfinals.

"I got broken four times which is difficult, but it's good to win those type of matches," said Federer, who faced eight break points against his serve. "I'm happy to get through.

"It didn't look good there for a while, but I got it done."

Federer handled the first set with confidence, but started to falter as Stepanek became more aggressive in the second set.

Federer managed to rebound from 4-2 down in the second set to force a tiebreaker -- where Stepanek raced into a 6-2 and a first set point when Federer double faulted. Stepanek won the set on his third set point when Federer netted a forehand.

Stepanek also took an early 2-0 lead in the third set, but Federer rebounded to go ahead 5-2 to serve for the match.

Federer's serve was broken when he double faulted in the eighth game.

Stepanek, however, surrendered his serve in the next game to allow Federer to move into the quarterfinals. He'll now face another Czech player in Lukas Rosol, who upset eighth-seeded Dmitry Tursunov of Russia 6-4, 7-6 (4).

"Today was quite frustrating," Federer said. "I had momentum on my side at the beginning, but it was tough to keep it going.

"After the first set I was under pressure the entire match."

Like Djokovic, third-seeded Tomas Berdych had an easy path to the quarterfinals with a 6-2, 6-1 win over Sergiy Stakhovsky of Ukraine.

Berdych, who will face fifth-seeded Jo-Wilfried Tsonga in the quarterfinals, has won his last eight matches.

Despite Berdych having trouble with his first serve -- his percentage was a ghastly 37 percent -- he controlled the match. He lost his serve once, and won 12 of the last 14 points.

"I was working a little more on my return stats than on my service stats," Berdych said. "The main focus really for the next days is to get my percentage of the first serve back and really find a nice and sweet rhythm for my serve."

Tsonga won his second-round match by walkover when his opponent, Nikolay Davydenko, withdrew with a rib injury.

Seventh-seeded Philipp Kohlschreiber was a 6-3, 6-3 winner over Andrea Seppi of Italy.

Kohlschreiber will play Tunisian wild card Malek Jaziri, who beat Somdev Devvarman of India 6-3, 7-5.