Starting from the front row, Alonso was running seventh when he began to struggle with an engine problem and his speed was compromised on the straights in the closing stages, leaving him vulnerable to chase from Bottas.
Ocon in front allowed Alonso to catch him to give him the DRS and help him stay away from the Alfa Romeo driver.
The plan worked and Alonso crossed the line in seventh, but the Spaniard was then penalized five seconds for moving too far ahead of Bottas on the final lap, dropping him to ninth.
Ocon was happy with his sixth place finish, noting that the car felt better on Sunday than at the start of the weekend.
“Well, I think from our side we can be happy with today,” he said. “I think the car was a bit livelier than the last two days.
“We still have a lot to figure out why this was the case. But I think we maximized the overall potential because the cars in front were too fast. And the cars behind were a bit faster than us to be fair.
Fernando Alonso, Alpine A522, Valtteri Bottas, Alfa Romeo C42
Photo by: Andy Hone / Motorsport Images
“Valtteri at the end put a lot of pressure on Fernando. And we tried to play the collective game so that I gave Fernando the DRS. And we did it well, we executed perfectly.
“Fernando had this little problem with the engine, so he was losing a bit of power, so I backed up in front of him on purpose to try and help him tow me so I could defend on Valtteri.
“So we did very good teamwork, all together, and we managed to hold on tight, because I was watching the race in the rear view mirror, it was a little close!
“It’s a big boost for us in the constructors’ championship. And yes, McLaren not scoring obviously helps us come back.”
At one point Alonso suggested he was faster than Ocon and should be allowed through, but the team ensured the order did not change.
“Well, I obviously trusted him and the team that that wouldn’t happen,” Ocon said. “We’ve done that in the past, in Brazil last year. And I wasn’t going to pass him when that happened. But if that means he can defend on Valtteri and not make a pass for Valtteri, then we can always change back after.”