Narrative:

Upon initially approaching the plane I noticed a small drip coming from the right wing's fuel sump. I called maintenance over to come look at it. After they jerked it open and closed a few times the drip stopped. Maintenance said there is no issue with taking it up flying. So I continued with my preflight. I taxied to the run up area just before runway xx and proceeded to do my run up. During the run up there were no indications of anything wrong. So I entered the runway and began my takeoff. During my roll all engine instruments were in the green and everything was going great. At 500 ft AGL my engine started to sputter. I immediately put the carb heat on and verified my mixture and power were at full. No effect. I immediately [advised on] CTAF and told everyone my intentions and emergency and begun a circle to land for runway yy. I touched down on runway yy with no issues but then my engine cut out immediately after touch down. It took a few tries to restart my engine but I finally did but found I needed half power in just to keep the engine running. I taxied back to the FBO and parked the aircraft. Immediately upon exiting the aircraft I smelled fuel and noticed fuel pouring out from under the front cowling in the vicinity of the nose gear. I wrote the plane up for maintenance and told them of my problem. As I am writing this report I am unsure of what was wrong. Best guess is the fuel line. I had a funny feeling that something might happen during my flight when I had maintenance come out to check the fuel sump drain. One thing that saved this from becoming an accident with an actual engine failure in flight was my swift decision making to immediately turn to the other runway and not take any chances. If I hesitated maybe another 30 seconds to come to a decision my engine would have surely quit in midair.

Google
 

Original NASA ASRS Text

Title: C172 pilot reported a loss of engine power after takeoff likely associated with a fuel leak from the cowling.

Narrative: Upon initially approaching the plane I noticed a small drip coming from the right wing's fuel sump. I called maintenance over to come look at it. After they jerked it open and closed a few times the drip stopped. Maintenance said there is no issue with taking it up flying. So I continued with my preflight. I taxied to the run up area just before Runway XX and proceeded to do my run up. During the run up there were no indications of anything wrong. So I entered the runway and began my takeoff. During my roll all engine instruments were in the green and everything was going great. At 500 ft AGL my engine started to sputter. I immediately put the carb heat on and verified my mixture and power were at full. No effect. I immediately [advised on] CTAF and told everyone my intentions and emergency and begun a circle to land for Runway YY. I touched down on Runway YY with no issues but then my engine cut out immediately after touch down. It took a few tries to restart my engine but I finally did but found I needed half power in just to keep the engine running. I taxied back to the FBO and parked the aircraft. Immediately upon exiting the aircraft I smelled fuel and noticed fuel pouring out from under the front cowling in the vicinity of the nose gear. I wrote the plane up for maintenance and told them of my problem. As I am writing this report I am unsure of what was wrong. Best guess is the fuel line. I had a funny feeling that something might happen during my flight when I had maintenance come out to check the fuel sump drain. One thing that saved this from becoming an accident with an actual engine failure in flight was my swift decision making to immediately turn to the other runway and not take any chances. If I hesitated maybe another 30 seconds to come to a decision my engine would have surely quit in midair.

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.