SAKHIR, Bahrain — Ferrari driver Charles Leclerc confirmed he is to be reckoned with by taking his first career pole position at the Bahrain Grand Prix on Saturday.

Leclerc topped all three sections of qualifying, having already been quickest in two of the three practice sessions.

"The car was amazing," Leclerc said. "A lot of emotions, I'm trying to stay as cool as possible."

Ferrari secured a 1-2 on the grid as four-time Formula One champion Sebastian Vettel qualified in second place. Although Vettel was later summoned to stewards for driving unnecessarily slowly on an in lap during qualifying, no action was taken against him.

Lewis Hamilton was third, followed by Mercedes teammate Valtteri Bottas. Red Bull's Max Verstappen qualified fifth followed by Haas driver Kevin Magnussen.

Lance Stroll of Montreal was 18th.

Leclerc's achievement earned him praise from Prince Albert of Monaco, who first met Leclerc when he was 12 in the royal palace. Prince Albert directly contacted Leclerc to offer his congratulations, express his pride in Leclerc, and wish him luck for the race, the Principality's press department told The Associated Press when contacted for comment.

It's hard to be more Monegasque than Leclerc, whose apartment is near the Monaco GP's race start-finish line. As a youth, he swam in the swimming pool next to the glittering harbour, the focal point of the track.

At 21 years and five months, Leclerc became the second youngest pole-sitter behind Vettel — slightly younger at 21 years, 72 days old in 2008 when he qualified first for the Italian GP when driving for Toro Rosso.With his multiple titles and 52 race wins, Vettel is the senior driver at Ferrari, on paper at least.

But he has finished second in the title race to Hamilton in the past two seasons and Ferrari is not imposing seniority on Leclerc in its quest to win a first drivers' title since Kimi Raikkonen in 2007.

Therefore Leclerc is free to race against Vettel providing there is not too much risk or carelessness which could cost Ferrari valuable points as the proud Italian manufacturer seeks a first constructors' championship since 2008.

"I will do everything to keep my first place," a determined Leclerc said, before adding cautiously. "But, obviously, we're a team as well."

After the disappointment of the season-opening Australian GP two weeks ago, Ferrari has looked ominous here with the drivers finishing 1-2 in all three practices and carrying that over into qualifying.

"We're both much happier with the car this weekend. The team has done very, very well," Vettel said. "We proved today we are capable of fighting from the front."

Leclerc carried the day, even surpassing his own leading time on his last lap to set a new record in Bahrain of 1 minute, 27.866 seconds on the 5.4-kilometre (3.3-mile) circuit — beating Vettel by around 0.3 seconds.

"Not exactly my day, but that's how it goes," said Vettel, who locked his tires a couple of times in qualifying. "It was not ideal for me but congratulations to him."

Leclerc is well poised for the first win of a career progressing as quickly and smoothly as his driving . He impressed last year with the Alfa Romeo Sauber team in his debut season, with 10 top-10 finishes and a best result of sixth in one of the grid's least competitive cars.

Qualifying started at 6 p.m. local time (1500 GMT) and mirrored cool race conditions for Sunday evening's race, which finishes with floodlights illuminating the desert track.

Bottas won in Australia ahead of Hamilton , where Vettel finished fourth and Leclerc fifth.

Vettel has won the past two Bahrain GPs driving for Ferrari and a record four overall, including two during his run of four straight F1 titles with Red Bull from 2010-13.

Hamilton's last win here was in 2015 from pole position for Mercedes.

"This is generally a weak circuit for me," said five-time F1 champion Hamilton, whose 73 wins puts him second behind Michael Schumacher's 91. "The Ferraris have shown incredible pace, but it doesn't mean they can't be beat."

Qualifying is split into three sections, with five drivers eliminated from Q1 and Q2 to leave 10 fighting for pole in Q3.

Hamilton set the quickest time but Leclerc beat it, and then he did even better.

___

More AP F1 coverage: https://apnews.com/FormulaOne and https://twitter.com/AP_Sports