Narrative:

We transitioned back to our home airport via a transition through class C. A couple minutes after; [tower] transitioned us to approach for flight following we switched our fuel tanks. We followed procedures and switched tanks by turning on the fuel pump; checking fuel pressure; switching the fuel selector; checking pressure; then turning the pump off.a few seconds after the pump was switched off we had an immediate loss of power. Tried to remedy by reversing the process; pump on; switch tanks while pitching for best glide. No restart and engine continued to lose all power. Tried a flow and checked anything that may lead to a fuel starvation issue. In the pitch black I found a well lighted area that was relatively free of ground traffic. It was a warehouse trucking lot. Was able to maneuver the aircraft between stacked shipping containers as to not hit them. Cleared the wing by 5-10 ft. And performed a normal landing. Came to a stop and contacted approach to let them know I was safe. No damage to the aircraft; no souls were harmed. [Notified ATC of the problem] roughly 1;000 ft. AGL. Cause is yet to be found; but I suspect something in the fuel line or contaminants in the fuel that reached the carburetor.

Google
 

Original NASA ASRS Text

Title: PA-28 Instructor Pilot reported safely landing in a parking lot following engine failure related to a fuel issue.

Narrative: We transitioned back to our home airport via a transition through Class C. A couple minutes after; [Tower] transitioned us to Approach for flight following we switched our fuel tanks. We followed procedures and switched tanks by turning on the fuel pump; checking fuel pressure; switching the fuel selector; checking pressure; then turning the pump off.A few seconds after the pump was switched off we had an immediate loss of power. Tried to remedy by reversing the process; pump on; switch tanks while pitching for best glide. No restart and engine continued to lose all power. Tried a flow and checked anything that may lead to a fuel starvation issue. In the pitch black I found a well lighted area that was relatively free of ground traffic. It was a warehouse trucking lot. Was able to maneuver the aircraft between stacked shipping containers as to not hit them. Cleared the wing by 5-10 ft. and performed a normal landing. Came to a stop and contacted Approach to let them know I was safe. No damage to the aircraft; no souls were harmed. [Notified ATC of the problem] roughly 1;000 ft. AGL. Cause is yet to be found; but I suspect something in the fuel line or contaminants in the fuel that reached the carburetor.

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.