* Brake Switch Issues: This is the most likely culprit. The brake switch signals the car's computer that the brakes are engaged. If this switch is faulty (worn contacts, internal failure, etc.), it might be intermittently interrupting the power or signal to the engine's control system when you brake, causing a stall. The immediate restart suggests a temporary break in the connection, not a complete failure.
* Low Idle Speed/Vacuum Leaks: When you brake, there's an increased demand for power assistance (power steering and brakes). If your idle speed is already low, or there's a vacuum leak in the intake system, the added load from braking can cause the engine to stall. The engine recovers quickly because the load is reduced once you release the brake.
* Alternator Issues (less likely): A failing alternator might not be providing enough power, and braking puts extra strain on the electrical system. This is less likely because the car restarts immediately; a severely failing alternator would likely leave the car unable to restart easily.
* Throttle Position Sensor (TPS) Problem (less likely): A faulty TPS can give inaccurate readings to the engine control unit (ECU). While less common to cause this specific symptom, a glitching TPS *could* cause the engine to stumble and stall under the extra load of braking.
* Transmission Problems (least likely): In automatic transmissions, there are some rare instances where a problem within the transmission itself *might* create a momentary power interruption under braking, but this is a less probable explanation for such a quick recovery.
Troubleshooting Steps:
1. Check the Brake Switch: This is the easiest and cheapest place to start. It's relatively easy to access and replace, and auto parts stores usually carry them.
2. Inspect for Vacuum Leaks: Look for cracks or loose connections in vacuum hoses, especially those connected to the brake booster.
3. Have the Idle Speed Checked: A mechanic can easily check if your idle speed is appropriately set.
4. Diagnose the Alternator: While less likely, a simple alternator test at an auto parts store is quick and inexpensive.
5. Professional Diagnosis: If the above steps don't reveal the issue, take your car to a qualified mechanic for a proper diagnosis using OBD-II diagnostic tools. They can read the car's computer for error codes that might pinpoint the problem more accurately.
It's crucial to address this issue promptly, as intermittent stalling while braking is a safety hazard.