Narrative:

Flying to see a friend and lost power at 9;500 feet. Intermittent power but not enough to maintain altitude. Ran through my checklist with no luck and requested priority handling with [ATC]. They gave me vectors to ZZZ which copilot had already identified and we did a 16 nm glide and descent and made the airport. Kept fiddling with fuel and lean combos and had time to take down a phone number for ATC so I could call after landing then switched to the unicom for ZZZ. Double checked the weather and made the airport with about 3;000 feet of altitude to spare. Spiral descent to downwind and landed without incident. There was a policeman waiting when we landed and mechanics on duty.I had 11 hours on the plane since a 100 hour inspection. The ignition harness had been replaced during that inspection at the same time a new electronic starter was installed. It was apparent to the mechanic at ZZZ that the spark plugs had not been removed; cleaned or replaced. One had ceased firing and was visibly oval shaped from wear and the other had corroded through the ceramic liner and was not firing properly and all 12 had not been cleaned. There was visible rust on the exterior of 2 of the other 10 (I'm not a mechanic but I read the 100 hour checklist to mandate a close look of any rusty parts). If the spark plugs were not removed; then they didn't do a compression test. The cessna 100 hour checklist calls for a compression test and an inspection of all engine systems.according to [mechanic:]replaced ignition switch with new acs A-510-2K with matching door locks.replaced elevator tips with new sa-0532001-94 & sa-0532001-100Replaced aileron rod ends with (4) new S1819-3Replace landing/taxi light switch with new 0713035-1Replaced air filter with new BA6108Performed an annual inspection as described under title 14 crash fire rescue equipment 43 appendix D and was determined to be in an airworthy condition at this time.please contact for further information.

Google
 

Original NASA ASRS Text

Title: C172 pilot reported an engine failure and forced landing due to improper maintenance.

Narrative: Flying to see a friend and lost power at 9;500 feet. Intermittent power but not enough to maintain altitude. Ran through my checklist with no luck and requested priority handling with [ATC]. They gave me vectors to ZZZ which Copilot had already identified and we did a 16 nm glide and descent and made the airport. Kept fiddling with fuel and lean combos and had time to take down a phone number for ATC so I could call after landing then switched to the Unicom for ZZZ. Double checked the weather and made the airport with about 3;000 feet of altitude to spare. Spiral descent to downwind and landed without incident. There was a policeman waiting when we landed and mechanics on duty.I had 11 hours on the plane since a 100 hour inspection. The ignition harness had been replaced during that inspection at the same time a new electronic starter was installed. It was apparent to the mechanic at ZZZ that the spark plugs had not been removed; cleaned or replaced. One had ceased firing and was visibly oval shaped from wear and the other had corroded through the ceramic liner and was not firing properly and all 12 had not been cleaned. There was visible rust on the exterior of 2 of the other 10 (I'm not a mechanic but I read the 100 hour checklist to mandate a close look of any rusty parts). If the spark plugs were not removed; then they didn't do a compression test. The Cessna 100 hour checklist calls for a compression test and an inspection of all engine systems.According to [Mechanic:]Replaced ignition switch with new ACS A-510-2K with matching door locks.Replaced elevator tips with new SA-0532001-94 & SA-0532001-100Replaced aileron rod ends with (4) new S1819-3Replace landing/taxi light switch with new 0713035-1Replaced air filter with new BA6108Performed an Annual Inspection as described under Title 14 CFR 43 Appendix D and was determined to be in an airworthy condition at this time.Please contact for further information.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.