Perez lapped the Sakhir circuit with a best time of one minute 32.758 seconds on soft tyres, 0.438 quicker than Spaniard Alonso, with reigning champion Max Verstappen (25) third and a further two tenths slower.
Double world champion Alonso, the oldest man on the grid, will be starting his 20th season after moving from Renault-owned Alpine.
McLaren's Lando Norris (23) was fourth, ahead of Ferrari's Charles Leclerc (25) and Aston Martin's Lance Stroll (24) -- the Canadian racing after breaking both his wrists in a cycling accident last month.
Stroll was kept waiting for the first 20 minutes due to an ignition problem.
Once-dominant Mercedes had a quiet session on a hot afternoon with seven times world champion Lewis Hamilton (38) 10th and teammate George Russell (25) 11th on medium tyres.
McLaren's Oscar Piastri (21) was the highest-placed rookie in 12th, with AlphaTauri's Nyck de Vries (28) 16th and Williams' Logan Sargeant (22) 18th.
Ferrari's Carlos Sainz (28) was last after a big spin.
Red Bull are favourites for the weekend in Bahrain after setting the pace in testing.