CHARLOTTE, N.C. (

TheStreet

) -- A

US Airways

(LCC)

pilot, fired 18 months ago after his gun discharged in the cockpit, has returned to work and is thanking his union for getting his job back.

Capt. James Langenhahn was stowing his .40 caliber pistol when it discharged as his plane was landing in Charlotte on March 22, 2008, after arriving from Denver. The bullet went through the cockpit wall and fuselage. Nobody was injured. Langenhahn was fired soon afterwards, but a federal arbitrator has ordered that he be reinstated after the US Airline Pilots Association filed a grievance.

"Had it not been for the support and aid provided by the US Airline Pilots Association, there would have been absolutely no chance of recovering my position," Langenhahn wrote in a recent letter to union president Mike Cleary. A copy of the letter was obtained by

TheStreet.com

.

Besides thanking the union and its grievance committee officers, Langenhahn also thanked hundreds of pilots who called and emailed him, and said that "dozens of our fellow pilots also made generous financial contributions to me," enabling him "to make the necessary payments to keep myself and my family going.

"My family and I experienced a lot of pain during this time but in the end it was the work and support of USAPA that brought this to a final and just conclusion," he wrote.

US Airways spokeswoman Michelle Mohr said the airline is abiding by the arbitrator's decision to reinstate Langenhahn, who is currently undergoing recurrent pilot training at the airline's flight training center in Charlotte.

As one of a variety of security measures including reinforced cockpit doors and enhanced airport screening that were instituted following the Sept. 11 attacks, the Transportation Security Administration created the Federal Flight Deck Office program, which permits pilots to be armed. An unknown number of pilots participate in the voluntary program, which requires redundant training on a pilot's personal time. Airlines do not support the program financially, but do not oppose it.

Pilots must remove their gun and holster and secure them in a bag before leaving the cockpit, a requirement that is believed to have contributed to the U.S. Airways incident. Mohr said Langenhahn will no longer participate in the program.P/>

-- Written by Ted Reed in Charlotte, N.C.

.