Two-time F1 world champion Alonso crossed the line just 0.053 seconds ahead of the Red Bull driver to secure the final podium spot at Interlagos, as Aston Martin returned to the rostrum for the first time since the Dutch GP in late August.
The battling duo injected late drama into a largely tepid affair won by Max Verstappen, as ninth-starting Perez dived up the inside of the AMR23 into Turn 1 on lap 70 of 71.
But on the final tour, Alonso - who had lined up fourth on the grid - made the Mexican move off-line to defend through the opening corners and then deployed DRS to dart round the outside into Turn 4.
Alonso then took a wide line into the last corner to aid his exit and uphill run to the flag but in the slipstream, Perez closed to tee up a spectacular finish.
PLUS: Brazilian Grand Prix Driver Ratings 2023
With Alonso narrowly holding on, Aston team principal Krack credited his experienced driver for taking “unconventional” routes.
He said: “It was an interesting fight in the last couple of laps. Obviously, the closer you go to the end of the race, the more exciting it gets… it was an interesting fight.
“You could see that we took some lines that were maybe a bit unconventional, let's say. But Sergio behind was told to do the same, interestingly.
Source: Autosport