Narrative:

While cruising in level flight at 7500 ft MSL; I experienced an intermittent engine failure. I declared an emergency; asked for the nearest airport. ATC directed me to ZZZ. Engine failed entirely. Some time after switching tanks; engine came back to life and I made an uneventful landing (to find a local fire truck waiting for me). After landing I realized I had run a tank dry.

Google
 

Original NASA ASRS Text

Title: GRUMMAN AA5 TRAVELER PLT HAS ENG FAILURE; DECLARES EMER AND DIVERTS TO LAND.

Narrative: WHILE CRUISING IN LEVEL FLT AT 7500 FT MSL; I EXPERIENCED AN INTERMITTENT ENG FAILURE. I DECLARED AN EMER; ASKED FOR THE NEAREST ARPT. ATC DIRECTED ME TO ZZZ. ENG FAILED ENTIRELY. SOME TIME AFTER SWITCHING TANKS; ENG CAME BACK TO LIFE AND I MADE AN UNEVENTFUL LNDG (TO FIND A LCL FIRE TRUCK WAITING FOR ME). AFTER LNDG I REALIZED I HAD RUN A TANK DRY.

Data retrieved from NASA's ASRS site as of January 2009 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.