MELBOURNE, Australia — Lance Stroll almost got to experience the full package on his first weekend in Formula One, hitting speeds exceeding 320 kph (199 mph), clipping a wall, being handed a grid penalty and skidding through the gravel. All that was missing was the finish.

The 18-year-old Canadian didn't make it to the finish in his debut for Williams at the season-opening Australian Grand Prix, retiring after an eventful 40 laps around the Albert Park circuit.

"We were running a decent race and the pace was pretty good," Stroll said. "I had a good start, which was risky although I didn't plan on it being quite so risky! Some guys braked quite early in front of me and I managed to gain some places.

"Then we managed to have a surprisingly good race. It was my first race, and first weekend, so there are a few positives to take out of it."

Stroll graduated from development driver to a seat in F1 this season for Williams, which lost Valtteri Bottas to Mercedes.

The son of billionaire investor Lawrence Stroll is mentored by former Ferrari sporting director Luca Baldisserri and won the Formula 3 European championship in 2016.

His first taste of the top level was one he put down to experience, having started at the back of the grid after getting a penalty for needing an unscheduled gearbox change following his crash in practice on Saturday.

"Unfortunately, that incident yesterday cost us a lot of positions in qualifying," said Stroll, whose top speed was among the fastest in the race, "but today I enjoyed myself and so a big thank you to the team."

His Williams teammate, 35-year-old Brazilian veteran Felipe Massa, finished sixth to earn some points from the opening weekend.

Stroll avoided a collision with two other drivers on the opening lap and, after an early pit stop for tires, was running as high as 13th before a problem with his front left break ended his race.

"It's a shame for Lance, who put in a good first drive with some overtakes in his first race in Formula One, so it is a shame that he then had to retire with a brake failure," Williams chief technical officer Paddy Lowe said. "Clearly that's an issue we need to get on top for the races to come and make sure we don't have a repeat.

"But, overall, congratulations to the team ... who have built a great car to launch our 2017 campaign."

Meanwhile, Sauber rookie Antonio Giovinazzi placed 12th on his F1 debut after coming in as a late replacement on Saturday when Pascal Wehrlein withdrew because of fitness problems.

"It was a good race, and I am happy with my performance," Giovinazzi said. "My objective was to gain more experience and collect mileage in the car. I want to thank the Sauber F1 Team and Scuderia Ferrari again for this opportunity. It was an amazing race weekend for me."

Sauber team principal Monisha Kaltenborn said it was an impressive performance from the young Italian driver in his first F1 race.

"He showed his potential as well as what the car is capable of," Kaltenborn said. "The lap times were quite satisfying."