A safety-car incident, sparked by a crash involving New Zealand's Brendon Hartley, set the stage for Daniel Ricciardo to win the Chinese Formula One Grand Prix.
Hartley was hit by Toro Rosso team-mate Pierre Gasly, on lap 31 of 56 in Shanghai, which saw the safety car appear.
Ricciardo started from the third row, but took advantage when the safety to pit for fresh tyres. He took the lead on the 45th lap, overtaking Valtteri Bottas of Mercedes.
Bottas finished second and Kimi Raikkonen of Ferrari was third. Lewis Hamilton was fourth. Sebastian Vettel, who won the first two races of the season, fell back to eighth after starting on the pole. He also had a minor collision late in the race that cost him places.
Hartley was eventually forced to retire on lap 51. Gasly received a 10-second time penalty, before finishing 18th.
Ricciardo's win was the sixth Formula One race victory of his career and first since Azerbaijan last June.
"I don't seem to win boring races," Ricciardo said.
"That was unexpected. It was hectic. I heard the safety car call at turn 14 and they said we are going to stop. It happened very quickly, but it was a decisive, winning move.
"Sometimes you have just got to lick the stamp and send it. I enjoyed it very much.
"We had the soft tyre so I knew I could at least get a little bit more out of the braking than them. A lot of the time you just get one chance to try so I thought I'd make the most of the opportunity."
Ricciardo reserved some praise for his team, for their sterling work in qualifying. That included an engine change that saw him make it on track with just 30 seconds to spare.
"Put ourselves 24 hours ago, I thought we may be starting at the back of the grid. Firstly, thanks to the boys. Yesterday I thanked them after qualifying, but this is the real reward for that work. The mechanics worked their butts off."
Vettel still leads the season standings with 54 points from three races.
Lewis Hamilton, the four-time and defending champion, improved his season points total to 43. Bottas has 40 points in third place heading into the next race in Azerbaijan.