A C172 pilot reported a rough running engine and diverted to a nearby suitable airport.
Synopsis
A C172 pilot reported a rough running engine and diverted to a nearby suitable airport.
Narrative
The flight was planned from ZZZ2 to ZZZ3 to ZZZ4 and then back to ZZZ2. Overall; the flight was planned for just under 3 hours. Weather and airfield information supported our flight. The preflight; ground operations; and initial departure were uneventful. After takeoff; ATC permitted navigation and altitude at our discretion. We climbed to 7500 FT enroute to ZZZ3. Approximately 40 minutes into the flight; I detected abnormal engine sounds and reduced engine performance. I then immediately took action to maintain positive aircraft control while the pilot not flying continued to analyze the instruments. After recognizing the issue was engine related; I told the pilot not flying to find the nearest airport for a precautionary landing. The closest airport was ZZZ1. I began a turn directly to ZZZ1 while capturing the appropriate glide airspeed per the flight manual. While I was doing this the pilot not flying began checklist procedures for engine roughness/misfire. After the pilot not flying completed the checklist; engine performance was remedied. From there we could once again maintain airspeed and altitude. With the added engine performance; I began a climb as we approached ZZZ1 in case the engine completely failed. After the pilot not flying completed the emergency and normal checklists; the pilot not flying continued to gather information about ZZZ1 to prepare for the landing. As we continued to ZZZ1; we realized that we might be able to safely arrive at ZZZ. ZZZ was more suitable because unlike ZZZ1; the runway was longer; paved and illuminated. As such; we continued to climb enroute to ZZZ1 to maximize options so that if the engine failed we would still be able to land at ZZZ1 but also if we could gain enough altitude we could safely arrive at ZZZ with safer landing condition. Once the pilot not flying said we gained enough altitude to safely glide to ZZZ; we began heading to ZZZ. During this time the pilot not flying continued to coordinate with ATC and requested priority handling. Later ATC cleared us to switch to CTAF frequency. The pilot not flying made the CTAF calls to announce our intentions. The pilot not flying also activated the runway lighting system. I continued to maintain positive control of the aircraft and performed a safe landing on Runway XX. After landing we taxied to park and shutdown the engine. After shutdown; the pilot not flying immediately informed ATC of our arrival by phone. I do not know what caused the issue but using the checklist greatly helped the situation.
Source: NASA Aviation Safety Reporting System (public domain). Reports are voluntary submissions and are not verified by NASA.