P0507 on 2004-2009 Mazda 3 2.3L: High Idle Causes and Fixes
On a 2004-2009 Mazda 3 2.3L, code P0507 is most often caused by a dirty electronic throttle body or a cracked PCV vacuum hose. Start by thoroughly cleaning the throttle body and performing an idle relearn procedure. This is a common, DIY-friendly fix.
- P0507 on the 2004-2009 Mazda 3 2.3L almost always points to a dirty throttle body or a vacuum leak.
- The first and cheapest step is to remove and thoroughly clean the electronic throttle body and replace its gasket.
- Carefully inspect the PCV hose located under the intake manifold, as it is a very common source of vacuum leaks.
- After any service involving the throttle body or battery, you must perform an idle relearn procedure for the engine to idle correctly.
- Do not replace expensive sensors like the MAF until you have ruled out a dirty throttle body and all possible vacuum leaks.
What's Unique About the 2004-2009 Mazda 3

The first-generation Mazda 3 (2004-2009) with the 2.3L engine uses an electronic throttle body (ETB) which integrates the idle control functions. Unlike older cars with a separate Idle Air Control (IAC) valve, the entire throttle body assembly is responsible for managing idle speed. These systems are known for carbon buildup inside the throttle body bore, which physically prevents the throttle plate from closing completely. Mazda even released a Technical Service Bulletin (TSB 01-007/09) acknowledging this exact issue on multiple models, recommending a thorough cleaning.
Symptoms You May Notice
- Check Engine Light is on
- Engine idles higher than normal (typically 1000-1500 RPM) when warm.
- Vehicle 'creeps' or pulls forward in 'Drive' without gas pedal input.
- Rough or surging idle, sometimes fluctuating up and down.
- Inconsistent RPM when coming to a stop.
- RPMs are slow to fall when letting off the gas pedal.
- Replacing the Mass Airflow (MAF) sensor. While a MAF sensor can cause idle issues, it's not the primary cause for P0507 on this vehicle. Owners often clean or replace it with no effect on this specific code.
- Replacing the Throttle Body without proper diagnosis. A dealer quoted one owner $800 for a replacement when the issue was just a poorly sealed gasket from a previous cleaning attempt.
Most Likely Causes


- Dirty Electronic Throttle Body 🔴 High Probability Carbon and oil vapor from the PCV system build up a sticky, hard ring around the throttle plate and bore, preventing it from closing fully. This is a well-documented issue for this engine, as confirmed by a Mazda TSB and numerous owner reports.
How to confirm: Remove the air intake hose from the throttle body and visually inspect for a thick ring of black carbon buildup. The back side of the throttle plate is often dirtier than the front.
Typical fix: Remove the throttle body (four 10mm bolts) and clean it thoroughly off the car with specialized throttle body cleaner and a soft cloth or brush. 🎬 Watch this step-by-step guide on removing and cleaning your throttle body. Pay special attention to the edges of the plate and the bore where it seats. Always replace the throttle body gasket.
Est. part cost: $5-$15 for cleaner and a new gasket. - Cracked or Leaking PCV Hose 🟡 Medium Probability The PCV hose, made of rubber, is located under the intake manifold where it is exposed to intense heat cycles. It becomes brittle and cracks over time, creating a significant vacuum leak that the PCM cannot compensate for.
How to confirm: Visually inspect the PCV hose, which connects the intake manifold to the oil separator/PCV valve. Check for obvious cracks, splits, or mushy, oil-soaked spots. A smoke test is the most definitive way to confirm a leak if it's not visually apparent.
Typical fix: Replace the failed PCV hose. Access is difficult as it is located under the intake manifold, often requiring removal of other components for clearance. 🎬 See how to access and replace the difficult PCV hose.
Est. part cost: $20-$50 for an aftermarket hose (e.g., Dorman) or $40-$60 for the OEM Mazda part. - Failed Throttle Body Gasket ⚪ Low Probability The gasket can become brittle and fail, or be installed incorrectly, creating a vacuum leak directly at the intake manifold. This often happens after the gasket has been disturbed during a throttle body cleaning and not replaced, or if it was accidentally flipped.
How to confirm: With the engine running, carefully spray brake cleaner or a propane torch (unlit) around the throttle body mating surface. If the engine RPM changes, a leak is present. A user on Mazda3Club.com found their gasket was installed incorrectly, causing a leak. A smoke test is a safer and more effective method.
Typical fix: Replace the throttle body gasket. It is strongly recommended to replace this gasket anytime the throttle body is removed for cleaning.
Est. part cost: $5-$15 - Improper Idle Relearn ⚪ Low Probability After disconnecting the battery or cleaning the throttle body, the PCM's learned idle values are cleared. It needs to relearn the new, cleaner throttle plate position. If this procedure isn't performed, the idle can remain high as the PCM is still trying to compensate for the carbon buildup that is no longer there.
How to confirm: This is a procedural issue, confirmed if the P0507 code appeared immediately after a battery replacement or throttle body service.
Typical fix: Perform an idle relearn procedure. There are several variations reported by owners: 1) The Simple Idle: Start the engine and let it idle with no accessories on for 10-15 minutes until fully warm. 2) The Key On/Off Method: Turn ignition to ON (engine off) for one minute, then OFF for one minute. Start the engine and let it idle for 15 minutes. 3) The Hard Reset: Disconnect the negative battery cable for 10+ minutes, press the brake pedal to drain residual power, reconnect, then perform the simple idle.
Est. part cost: $0
Rare But Worth Checking
- Faulty Intake Manifold Runner Control (IMRC) Solenoid or Hoses: The IMRC system uses vacuum lines and an actuator that can fail or leak. A leak in this system can introduce unmetered air into the intake manifold, causing a high idle similar to a PCV hose leak.
- Failing Electronic Throttle Body: While cleaning usually resolves the issue, the internal electronic motor or position sensor within the throttle body can fail, requiring a complete replacement. This is often a last resort after cleaning and vacuum leak checks have failed.
- Failing Battery or Alternator: A user on Mazdas247 reported that after extensive troubleshooting, replacing a weak battery finally solved their P0507 code. An unstable voltage supply can cause the ECU to behave erratically and miscalculate idle targets.
Diagnosis Steps
- Read Freeze Frame Data: Note the engine RPM, coolant temperature, and other parameters when the code was set to understand the conditions.
- Visual Inspection: Check for obvious issues like a disconnected air intake hose, a floor mat pushing on the accelerator pedal, or a loose vacuum line.
- Inspect for Vacuum Leaks: Carefully inspect all vacuum hoses. The PCV hose running under the intake manifold is the prime suspect; check for cracks or mushiness. A smoke test is the most reliable method to find hard-to-see leaks around the intake manifold, throttle body gasket, and IMRC system.
- Inspect and Clean Throttle Body: Remove the air intake duct. If dirty, remove the four 10mm mounting bolts, disconnect the electrical connector, and pinch off the two small coolant lines with hose pinchers before disconnecting them. Clean it thoroughly off the car.
- Replace Gasket: Always install a new throttle body gasket (Part No. L3K9-13-655) upon reinstallation. Ensure it is oriented correctly.
- Perform Idle Relearn Procedure: After reassembly and reconnecting the battery, perform one of the idle relearn procedures. The simplest is to let the car idle uninterrupted for 10-15 minutes until the cooling fans cycle. 🎬 Watch a demonstration of the proper idle speed relearn procedure.
- Clear Codes and Test Drive: Clear the P0507 code with a scanner and drive the vehicle. If it returns and no vacuum leaks are present, and cleaning was thorough, the throttle body itself may be faulty or the battery's health should be checked.
Parts You'll Likely Need

- Electronic Throttle Body
(OEM #L3R4-13-640)— This is the primary cause if cleaning fails to resolve the high idle. The internal electronics or motor can fail. This part number replaces the older L3G2-13-640A.
Trusted brands: Hitachi, Bosch, Standard Motor Products
OEM price range: $400-$600
Aftermarket price range: $80-$200 - PCV Hose
(OEM #LF62-13-895)— This hose is a very common failure point for vacuum leaks on the 2.3L engine, leading directly to a high idle. It connects under the intake manifold.
Trusted brands: Dorman, Gates, Genuine Mazda
OEM price range: $40-$60
Aftermarket price range: $20-$40 - Throttle Body Gasket
(OEM #L3K9-13-655)— This should be replaced whenever the throttle body is removed for cleaning to prevent a vacuum leak. An old or improperly installed gasket is a common cause of recurring issues.
Trusted brands: Fel-Pro, Mahle, Genuine Mazda
OEM price range: $8-$15
Aftermarket price range: $3-$8
Related Codes That Often Appear With This One
- P0171 — System Too Lean (Bank 1). This code often accompanies P0507 because a vacuum leak is a common cause for both. The leak allows unmetered air into the engine, which the oxygen sensors detect as a lean condition, while the PCM detects the resulting high idle.
- P0300 — Random Misfire Detected. A significant vacuum leak can disrupt the air-fuel ratio enough to cause misfires on multiple cylinders, especially at idle.
Technical Service Bulletins (TSBs) & Recalls
- 01-007/09 - Multi-Model - Unstable Idling/Engine Stalls Just After Stopping
Platform-Specific Known Issues
- Mazda Technical Service Bulletin 01-007/09 was issued for unstable idling and stalling on 2004-2009 Mazda 3 models due to carbon accumulation in the throttle body. The official repair is to clean the throttle body and replace the gasket.
- A real-world repair story from Mazda3Club.com highlights the importance of using the correct parts. An owner was sold a throttle body from a 2.5L engine for their 2.3L, which did not fit, delaying the repair. They later discovered the original issue was simply an improperly sealed gasket.
Mechanic-Grade Diagnostic Values
- Long Term Fuel Trim (LTFT) at idle — expected: Close to 0%, ideally within +/- 5%. Failure: Consistently high positive values (e.g., +7% to +15% or higher) suggest the PCM is adding fuel to compensate for unmetered air from a vacuum leak.
- Mass Air Flow (MAF) Sensor Reading at Idle — expected: Approximately 2.0 g/s for a 2.0L engine at warm idle (around 700 RPM). The 2.3L should be slightly higher, proportional to its displacement.. Failure: A significantly lower reading could indicate a failing MAF sensor, but a vacuum leak post-MAF is a more common cause for P0507.
- Throttle Body Connector Voltages (Key On, Engine Off) — expected: A forum user reported measuring the following on the female connector: Pin 2: ~6.1V, Pin 4: ~6.9V, Pin 5: ~6.3V, Pin 6: ~6.3V, with Pin 1 and 3 showing no reading. These values are not from an official manual and should be used as a rough reference.. Failure: Significant deviation or absence of voltage on multiple pins could indicate a wiring or PCM issue.
Scan Tool Commands That Help
- Mazda IDS (or equivalent high-end scanner): Throttle Body/Actuator Test — This bidirectional test allows the technician to command the throttle plate to specific angles to verify the motor and position sensors are responding correctly, helping to differentiate between a dirty throttle body and a failed electronic component.
Wiring & Ground Locations
- Throttle Body Connector — Directly on the electronic throttle body, a 6-pin connector.. This is the single connection point for all power, ground, and signal wires for the throttle body. Corrosion or damage to these pins or wires can cause erratic throttle behavior and trigger P0507.
- Main Engine/Chassis Grounds — Key factory ground points are on the transmission case and on the chassis near the driver's side fender/strut tower, connecting to the negative battery terminal.. A poor engine or PCM ground can cause unstable voltage references for sensors, leading to incorrect readings and calculations for idle speed control.
Real Owner Repair Stories
- Mazdas247 forum user 'smetzger' (2003 Mazda Protege5 (shares engine architecture with Mazda 3)) — Check Engine Light with P0507.
❌ Tried (didn't work) Replacing PCV valve and spark plugs, Cleaning the throttle body, Checking for vacuum leaks (none found), Swapping the IAC valve with a known-good one from another car
✅ What actually fixed it Replacing a weak battery. After replacement, the idle was noticeably lower and the code did not return. - Mazda3Club.com user 'Mudnyrey' (2006 Mazda 3 S 2.3L) — Rough idle, occasional stalling, then CEL with P0507.
❌ Tried (didn't work) Initial throttle body cleaning, Replacing the throttle body with a used unit (which also threw the code)
✅ What actually fixed it The user discovered the throttle body gasket had been installed incorrectly (flipped), causing a vacuum leak. After correcting the gasket orientation and later installing a properly functioning replacement throttle body, the issue was resolved.
"I Checked Everything" — The Actual Cause
- In one documented case on the Mazdas247 forum, a user passed vacuum leak checks and replaced or cleaned multiple components (PCV, throttle body) to no avail. The final fix was replacing a weak battery, which stabilized the electrical system and allowed the PCM to control the idle properly.
OEM Part Supersession History
L3G2-13-640A→L3R4-13-640— Standard part revision and update by the manufacturer.
Heads up: The throttle body from a 2010+ 2.5L engine is physically different and will not fit or function correctly on the 2.3L engine.
Model Year Variations Within This Range
- 2004-2005 vs 2006-2009: There were minor engine revisions during the 2006 facelift. While the core 2.3L engine block is the same, some sensors, the crank pulley, and the intake camshaft design may differ between early (04-05) and late (06-09) models. This is critical when sourcing used engines or certain sensors, though the throttle body and PCV system remained largely consistent causes for P0507 across the generation.
Diagnostic Flowchart
Real Owner Stories
Aggregated from forums and TSBs cited above. Mileages and costs reflect what owners reported in those sources.
2004-2009 Mazda 3 2.3L
Symptoms: Chased a persistent P0507 code and experienced repair delays after being sold an incompatible throttle body from a 2.5L engine.
What fixed it: Discovered the original issue was simply an improperly sealed throttle body gasket after a previous cleaning. Replaced and seated the gasket correctly.
Source hint: Mazda3Club.com - 'P0507 Issue trying to resolve'
2009 Mazda 3
Symptoms: The P0507 code appeared immediately after cleaning the throttle body.
What fixed it: Performed a battery disconnect and ECU reset, which allowed the computer to 'relearn' the new idle position for the clean throttle plate.
Source hint: Reddit (r/mazda3) - 'P0507 code 2009 Mazda 3'
2004-2009 Mazda 3 2.3L
Symptoms: Experienced a persistent P0507 code despite trying all common fixes, including cleaning the throttle body and checking for vacuum leaks.
What fixed it: Replaced a weak battery. The voltage instability from the old battery was preventing the system from maintaining the correct idle control parameters.
Source hint: Mazdas247 - 'Woes of P0507 Idle Control System RPM: Higher than Expected'
Mazda 6 2.3L
Symptoms: Triggered a CEL with code P0507 on a platform-mate vehicle sharing the same 2.3L engine.
What fixed it: Cleaned the throttle body and checked for vacuum leaks, corroborating that these are the primary fixes across Mazda platforms using the 2.3L engine.
Source hint: Mazda Forum - 'CEL code p0507'
Related OBD-II Codes
Frequently Asked Questions
Does Mazda have a TSB for the P0507 code on my 2004-2009 Mazda 3?
I just cleaned the throttle body on my 2.3L Mazda 3 and now I have a P0507 code. What did I do wrong?
Where is the PCV hose located on the 2.3L engine, and why is it a suspect for P0507?
What is the correct part number for the throttle body gasket on the 2.3L Mazda 3?
Can a weak battery cause a P0507 code on my Mazda 3?
I need to replace my throttle body to fix this code. Can I use one from a 2.5L Mazda engine?
Helpful Videos
Used OEM Parts in Stock
New Aftermarket Parts Available
The information in this article is provided for general reference and educational purposes only. Vehicle specifications, procedures, and part compatibility can vary by production date, trim level, and region. Always consult your vehicle's factory service manual and verify part numbers before purchasing or performing repairs. Safety-critical components such as airbags, seat belts, and braking systems should be installed by a qualified professional.
- Mazda 3:
- 🎬 Helpful Videos
- 🛍️ Shop This Part
- What's Unique About the 2004-2009 Mazda 3
- Symptoms You May Notice
- Most Likely Causes
- Rare But Worth Checking
- Diagnosis Steps
- Parts You'll Likely Need
- Related Codes That Often Appear With This One
- Technical Service Bulletins (TSBs) & Recalls
- Platform-Specific Known Issues
- Mechanic-Grade Diagnostic Values
- Scan Tool Commands That Help
- Wiring & Ground Locations
- Real Owner Repair Stories
- "I Checked Everything" — The Actual Cause
- OEM Part Supersession History
- Model Year Variations Within This Range
- Diagnostic Flowchart
- Real Owner Stories
- 2004-2009 Mazda 3 2.3L
- 2009 Mazda 3
- 2004-2009 Mazda 3 2.3L
- Mazda 6 2.3L
- Related OBD-II Codes
- Frequently Asked Questions
- 🎟️ Get 5% Off