Bearman, who is the third youngest driver to start an F1 race, qualified 11th and held that position from the start, before losing a place after Lance Stroll’s crash led to an early safety car period.
He passed Zhou Gunayu’s Sauber and then Nico Hulkenberg’s Haas and went on to finish immediately ahead of fellow Britons Lando Norris, of McLaren, and Mercedes’ Hamilton.
He was named driver of the day in the fans’ vote.
Bearman’s father David was in the Ferrari garage, nervously watching on, while among those to offer congratulations in the paddock afterwards was Spaniard Sainz, who was at the Jeddah circuit the day after he had surgery.
Bearman said that “mentally it was a difficult race” and physically he was “struggling too”.
He added: “I felt like I was a bit quicker than [Fernando] Alonso and [George] Russell in front but not enough to catch. I lost a lot of time trying to pass Hulkenberg, who used his experience to keep me back for more laps than he should have. That’s my bad but it was a good race.
“Especially my lower back and neck are hurting, these seats take a bit of fine-tuning and we didn’t have time to focus on that. It was a good motivation to finish the race quicker.”
Bearman, from Chelmsford in Essex, started karting when he was eight years old. He made his single-seater debut in 2020, won both the Italian and German Formula 4 titles in 2021, finished third in his debut Formula 3 season in 2022 and was sixth in F2 last year.
He has been a member of the Ferrari driver academy since 2021 and drove two practice sessions for the Haas team in F1 last year.