Ducati's Dovizioso clocked a 2min 11.485secs lap for his second pole of the season
Ducati's Dovizioso clocked a 2min 11.485secs lap for his second pole of the season on a newly repaved Sepang circuit that riders complained was taking too long to dry after Malaysia's tropical rains.
"I'm really happy to make a pole position because the conditions were difficult," said Dovizioso, who pitted amid qualifying for a tyre switch that confirmed the pole.
"I was able to improve on the last lap with the hard tyre and ... was able to go much faster. So I'm really happy about that speed."
"It wasn't easy but we did a great job."
With Honda's Marc Marquez of Spain having clinched the MotoGP crown two weeks ago in Japan, Sunday is set up for a contest between Rossi and Yamaha teammate Jorge Lorenzo for runner-up honours in the world championship.
The 37-year-old legend Rossi leads the Spaniard by 24 points with two races left.
In the frantic late stages of qualifying on Saturday, Rossi leap-frogged Lorenzo into second position, finishing just 0.246 behind Dovizioso.
It was a far better result for Rossi than in Australia the previous week, when he managed only 15th on the grid yet still stormed to a second-place finish behind winner Cal Crutchlow of Honda.
"Everybody is hoping for a dry race tomorrow because we will be able to see a good fight," Rossi said.
"It's not the normal conditions," he said of the slow pace of drying in some spots.
"So anything can happen tomorrow."
Lorenzo, the 2015 world champ, rounds out the front row, while Marquez leads the second line after finishing fourth in qualifying despite battling gastroenteritis for days.
No rider has been as successful at Sepang as Rossi, who has won here six times.
But the nine-time world champion has not won in Malaysia since 2010, which was also the last year he took the MotoGP world title.
Track temperatures have been moderate this week, but can top 50 degrees centigrade (122 Fahrenheit) -- straining both man and machine.
The tropical humidity and sudden heavy downpours also can pose control issues.
Riders had to contend with a heavy rain Saturday that soaked the track before final qualifying got going and were still adapting to the repaving.
"We have to work in these conditions, but starting in the front row is really good," Rossi said.
Modifications to some turns also have made it a learning process this week, with several riders going down at various points.
Track officials said all the changes were aimed at improving run-off and tyre grip.
But some riders have complained in particular about the difficulty negotiating the modified hairpin final curve, which now slopes away from the direction of the turn.
Lorenzo called the curve "strange" but praised the repaving overall for resulting in "excellent" tyre grip.