Mercedes driver Lewis Hamilton held off Max Verstappen's Red Bull for victory in an extraordinary finish to the Bahrain Grand Prix.
Verstappen actually took the lead from Hamilton with four laps to go but handed the position back because he had overtaken by running off the track.
The move - an order from race control - cost the Red Bull driver the victory. Verstappen never quite got close enough again to challenge Hamilton.
It was a remarkable climax to a tense and thrilling strategic battle that bodes well for an epic season between the two men.
Verstappen complained over the radio about being ordered by his team to hand the lead back but was told they had no choice.
The drivers had been referred by the race director before the race to a rule that says they cannot leave the track and gain a lasting advantage, and that officials can give them the "opportunity to give back the whole of any advantage gained by leaving the track".
- What a race to open a potentially thrilling season
It was a brutal end to the race for Verstappen, who had taken a dominant pole position and had looked to have pulled off a great comeback drive for victory.
But both men drove brilliantly, as Mercedes and Red Bull fought a strategic battle for superiority in one of the most gripping races for some time.
Verstappen converted his pole into a lead at the start, but Hamilton moved in front when Mercedes stopped him earlier to go for the so-called undercut when a driver pits to gain from the speed benefit of fresher tyres.
That gave Hamilton track position, and he kept it through his second pit stop.
Verstappen was told to hand the lead back to Hamilton
Red Bull decided to run Verstappen 11 laps longer to give him a tyre advantage at the end of the race, and he stopped with 18 laps to go, setting up a grandstand finish.
Hamilton had to measure his pace to hold Verstappen for as long as possible while also keeping his tyres in decent shape for the inevitable battle in the closing laps.
Verstappen was on Hamilton's tail with five laps to go, and passed him a lap later around the outside at Turn Four.
It looked to be a superb move to clinch what would have been a deserving victory and an emphasis that Red Bull had the fastest car this weekend.
But a flick of oversteer as he went around Hamilton took him wide, and he broke the rule that said drivers had to stay the right side of the exit kerb on the outside of the corner.
Ironically, Red Bull had complained earlier in the race that Hamilton had been using that piece of track, and the world champion was told to stop doing it by race control or risk a penalty.
The officials treated Verstappen with the same strictness and he was immediately told to let Hamilton by, which he did on the straight down to Turn 11.
It looked a certainty that Verstappen would simply climb back on to Hamilton's tail and do the move again, but his pace had dropped and Hamilton had just enough to hold him off, to take the 96th victory of his career after a remarkable drive.
- Behind the leaders
Life was made even harder for Hamilton when his team-mate Valtteri Bottas suffered a slow second pit stop when a front tyre proved difficult to remove.
Had the stop gone smoothly, Verstappen would either have had to stop shortly afterwards, minimising his tyre advantage over Hamilton, or run long and then had to pass both Mercedes to win.
But the removal of the Finn allowed Red Bull to delay Verstappen's stop to give him a much bigger grip advantage over Hamilton for the end of the race.
Bottas drove a steady race while never looking likely to trouble the fight for victory, while Lando Norris drove an exceptional race to win the fight for best of the rest in his McLaren.
The Briton set the stage for his result with a combative opening part of the race, in which he fought past team-mate Daniel Ricciardo on the first lap and then, after an early safety car to recover the crashed Haas of Nikita Mazepin, passed Pierre Gasly's Alpha Tauri and Charles Leclerc's Ferrari to take the place he would not lose for the rest of the race.
Norris finished in fourth place, while new McLaren team-mate Ricciardo ended the day seventh
Red Bull's Sergio Perez had to start from the pit lane after his engine cut out on the formation lap, but climbed back up the field in trademark style to take fifth place ahead of Leclerc and Ricciardo.
Ferrari's Carlos Sainz was eighth, Japanese rookie Yuki Tsunoda scored points on his debut in ninth for Alpha Tauri and Lance Stroll's Aston Martin rounded out the top 10.
Stroll's team-mate Sebastian Vettel had a difficult day and was penalised 10 seconds for ramming into the back of Esteban Ocon's Alpine after being overtaken on the approach to Turn One.
Mick Schumacher finished last in the Haas, after he copied Mazepin's spin at Turn Two on the restart after the safety car period, albeit without clouting the wall.
Fernando Alonso retired his Alpine after a brake failure caused by debris in his brake ducts and had also been having problems with his engine.
- Driver of the day
Two men stood out, Hamilton and Verstappen in a race of their own. But Hamilton gets it for the controlled manner in which he managed his pace under intense pressure
- What happens next?
A three-week break before the Emilia Romagna Grand Prix at Imola. After this, the anticipation for round two will be sky-high.
- 'Hardest race for a while' - what they said
Lewis Hamilton: "Wow. What a difficult race that was. Stopping early we knew would be difficult but we had to cover Max, they have had an amazing performance all weekend Max was all over me at the end and I was just about able to hold him off. That was one of the hardest races I've had for a while."
Max Verstappen: "It's a shame but you also have to see the positive. We are really taking the fight to them, and I think that's great to start the year like that. Overall we managed to score good points."
Valtteri Bottas: "Disappointing for sure but a good thing for the team we got good points. It feels for me that it was on the defensive side and not attacking. Not ideal and I had a slow pit stop which in the end took away any opportunities."
Haas rookie Mazepin was an early casualty after a crash on the opening lap
This was Hamilton's first season-opening win since the Australian Grand Prix in 2015
One down: The 2021 season will be F1's longest-ever campaign with 23 races