A former flight student of a municipal airport in South Los Angeles tried to steal a plane at gunpoint on Friday, but was arrested when deputies were alerted.

The incident went down just before 8 a.m. Friday at the Compton/Woodley Airport in Compton.

Deputies arrested Troy Daniel Long, 25, of Bellflower. He was booked into federal custody on suspicion of aircraft piracy and taken to the Federal Metropolitan Detention Center.

Long allegedly entered the airport office and removed keys for airplanes, deputies said.

When employees confronted him, he allegedly pulled a gun and left the office with the keys.

He went to the tarmac and got onto a two-seat single engine Cessna 152 prop plane and started the engine.

As deputies arrived, Long was revving the engine attempting to fly away.

Since the back part of the plane was still secured to the tarmac, he could not take off.

The airplane was lurching and bucking against the chain.

Deputies, with guns drawn, began yelling for Long to turn off the plane’s engine.

Finally, Long pulled off his headset, turned off the engine, put his hands in the air, got out and was taken into custody.

Follow NBCLA for the latest LA news, events and entertainment: iPhone/iPad App | Facebook | Twitter | Google+ | Instagram | RSS | Text Alerts | Email Alerts