If the selector lever will not move from P using the proper shift procedure, continue to hold down the brake pedal.

Take the vehicle to an Authorized Mazda Dealer to have the system checked.
Shift-Lock System
Manual Shift ModeNeutral Switch Removal/Installation [G35 M R]
1. Remove the battery cover..
2. Disconnect the negative battery cable.
3. Remove the battery component. (ex: battery, battery tray and PCM component)(See
BATTERY REMOVAL/INSTALLATION [MZR 2.0, MZR 2.5].)
4. Remove the aerodynamic under cover No.2..
5. Drain the oil from the transaxle..
...
Fuel Pump Unit Disassembly/Assembly [Mzr 2.0, Mzr 2.5]
WARNING:
Fuel is very flammable liquid. If fuel spills or leaks from the pressurized
fuel system, it will cause serious injury or death and facility breakage. Fuel
can also irritate skin and eyes. To prevent this, always complete the “Fuel
Line Safety Procedure”, while referring to ...
Front Lower Arm Removal/Installation
CAUTION:
Performing the following procedures without first removing the ABS wheel-speed
sensor may possibly cause an open circuit in the wiring harness if it is pulled
by mistake. Before performing the following procedures, disconnect the ABS wheel-speed
sensor wiring harness connec ...