An Arizona man who tried to open an emergency exit during a flight from Anchorage, Alaska, to Portland, Oregon, has been sentenced to three years on probation.

Alexander Michael Herrera faced prison time after pleading guilty to interfering with a flight crew. But federal prosecutors say they recommended probation because he has shown "remarkable dedication" toward staying on his medication for bipolar disorder and getting his life on track.

Court papers say Herrera asked fellow passengers during the May 2013 flight, "What would you do if I open the exit door?" He then tried to open it. Passengers helped wrestle him to the floor.

Herrera told the court Monday he never intended to harm or scare anyone, and he will stay on his medication.