The second-ranked Federer is looking for his sixth title in Dubai. He next faces Albert Montanes or Marcel Granollers.

Federer was playing the 128th-ranked Jaziri for the first time and had said he expected a “tricky” match. The Swiss star was proved right in the first set when Jaziri broke serve to go up 6-5 and closed it out with a backhand down the line.

The 17-time Grand Slam champion dominated from that point on, racing through the second set in 23 minutes and breaking Malek twice in the third set.

Related

“We were both not playing really well in the beginning. We were both missing a lot of first serves, or him in particular,” said Federer, who served 10 aces. “I think because I couldn’t take advantage, I went from ’not so good’ to really ’not so good’ — and then he got better naturally.

“For me, it was important to sort of react and make sure I don’t panic.”

Coming off a quarterfinal loss to Julien Benneteau in Rotterdam, Federer said the tight match would serve him well for the rest of the tournament.

“It was good in terms of nerves, getting out there and having to survive difficult moments,” Federer said. “Moments like this where you’re just not feeling quite right but you get it done. Then all of a sudden you feel like now you’re in the tournament.”

It was Jaziri’s first match of the year because of a knee injury.

“I give everything today. I did my best,” said Jaziri, who has never beaten a top-10 opponent.

Top-seeded Novak Djokovic opens Wednesday against Viktor Troicki in an all-Serb match. But he got a workout Tuesday, teaming up with brother Marko in doubles against Nikolay Davydenko and Dick Norman but losing in a champions tiebreaker.