A gun belonging to the pilot of a US Airways plane discharged as the aircraft was on approach to land in North Carolina over the weekend, the first time a weapon issued under a federal program to arm pilots was fired, authorities said Monday.Airline and federal officials said flight 1536 was not in any danger as a result of the incident, which occurred about 9:50 a.m. MDT on Saturday. There were 124 passengers, two pilots and three flight attendants on board the flight at the time. No one was injured.Greg Alter of the Federal Air Marshal Service said, "there was never any danger to the aircraft or to the occupants on board."It was the first time a pilot's weapon has been fired on a plane under a program created after the Sept. 11, 2001, terrorist attacks to allow pilots, for example, to use a firearm to defend against any act of air piracy or criminal violence, he said.The Transportation Security Administration is investigating how the gun discharged and is being assisted by the Federal Air Marshal Service, Alter said."TSA and the Federal Air Marshals Service take this matter seriously and an investigation is underway," the TSA said. "The pilot was authorized to be in possession of the weapon and he completed the appropriate training."The pilot in question, who was sitting in the left seat, last re-qualified on Nov. 7, 2007.U.S. Airways said it is cooperating with law enforcement authorities investigating the incident.Federal Flight Deck Officers use Heckler and Koch universal self-loading 40-caliber pistols and are allowed to carry these weapons ready to use -- like any other law enforcement officer. The Federal Flight Deck Officers need to be re-qualified twice a year.Pilots must volunteer, take a psychological test and complete a weeklong firearms training program run by the government to keep a gun in the cockpit.The TSA initially opposed the Flight Deck Officer program to arm and train cockpit personnel. Agency officials worried that introducing a weapon to commercial flights was dangerous and that other security improvements made it unnecessary. Congress and pilots backed the program."The TSA has never been real supportive of this program," said Mike Boyd, who runs the Colorado-based aviation consulting firm The Boyd Group. "It's something I think Congress kind of put on them."Boyd said he supports the program to arm pilots, saying, "if somebody who has the ability to fly a 747 across the Pacific wants a gun, you give it to them."A federal aviation security source told ABC the discharged round hit the side of the Airbus A319 and did not hit any sensitive equipment. The round likely exited the bulkhead but did not result in depressurization.Boyd said Saturday's incident could have been much worse."At that altitude, you puncture the skin of an airplane, it's going to go down. They were very lucky," Boyd said.Boyd said the only way he can surmise a gun going off in flight is if it was not properly stored."A properly stored weapon with the safety on does not go off," he said. "The gun had to be out in the open. The gun had to be handled. The gun had to be in somebody's control."TSA said passengers were not aware that the weapon was discharged and flight 1536 landed without incident.The jet has been taken out of service for inspection.