A federal air marshal yesterday shot and killed an American Airlines passenger who allegedly said he had a bomb in his bag at Miami International Airport, the first fatal shooting by an undercover agent since the sky marshals' rapid expansion after the 2001 terrorist attacks.

Federal officials said there was no evidence that the passenger, Rigoberto Alpizar, 44, was a terrorist. Department of Homeland Security officials said Alpizar ignored two air marshals' orders to get down on the ground and he appeared to be reaching into his bag when one of the marshals fired. No one else was harmed, but officials ordered all passengers off the plane, removed all of the luggage and blew up two bags belonging to Alpizar on the tarmac as a precaution.

Homeland Security spokesman Russ Knocke said in a statement that the marshals "took appropriate action" and that their decision to shoot was "consistent with their training."

The Miami-Dade County Police Department is investigating the shooting, and the FBI said yesterday that it is investigating whether the incident was related to a terrorist plot. "We're looking to see if there's a nexus" involving terrorism, said Andy Apollony, FBI assistant special agent in charge in Miami. "Right now we're not seeing it, but we continue to look. Anyone who gets on a plane and says they have a bomb, we are going to keep looking at it."

A woman who answered the phone at Alpizar's residence in Maitland, Fla., said she had no comment.

Several supporters of the air marshal program praised the marshals' actions, but the shooting is likely to raise questions about the expanded presence of guns aboard commercial airplanes in recent years, as well as the marshals' training -- in particular, with people who appear to be mentally unstable. Moments before he was shot, Alpizar's wife said he was bipolar.

Air marshals do train on how to deal with unstable passengers. "The difficulty of the job is you have a split second to make a decision," Brian Doyle, a spokesman for Homeland Security, said in an interview.

Much of the air marshals' work remains a mystery because many details about the program, such as where the marshals fly, how many there are and even their names, are confidential. The nation had only 33 sky marshals before the Sept. 11 attacks. The program was expanded rapidly to several thousand marshals, who fly in teams of two on many flights in and out of Washington and New York airports. Through international agreements, they also fly on a number of international flights.

Yesterday's drama unfolded before the flight began. All 114 passengers had boarded American Flight 924, scheduled to leave Miami for Orlando, yesterday afternoon when Alpizar, a Florida resident traveling with his wife, said he had a bomb in his carry-on bag, federal officials said. Alpizar had arrived in Miami from Quito, Ecuador, earlier that day and had stopped in Miami to board the second leg of his trip to Orlando, federal officials said.

Several witnesses said they saw Alpizar run from his seat near the back of the plane to the front toward the cockpit, where air marshals confronted him. Passenger Mary Gardner, who said she was aboard the flight, said she saw the man identified as Alpizar run up the aisle, and he appeared to be panicked, she told WTVJ-TV in Miami. As he ran, his wife screamed "My husband! My husband!" and said that her husband was bipolar and had not taken medicine, Gardner told the television station.

Officials with the marshal program said two agents, whom they did not identify, confronted Alpizar in the jetway as he left the plane. Officials did not disclose how many shots were fired or where Alpizar was hit. They said the marshals were being interviewed.

All of the passengers were initially ordered to put their hands on their heads and were led off the plane. They were put on buses, and many were questioned. Airline executives said the passengers eventually were allowed to go on other flights to Orlando.

The incident shut down one terminal for a short time but never closed the airport. Most of the events unfolded on national television, which showed machine-gun-toting SWAT team officers swarming the ground near the 757 jet and the explosion of Alpizar's bags.

Federal and local officials are still determining which agency will the lead the investigation of the shooting. The FBI takes the lead when investigating crimes aboard aircraft, but federal officials said that Alpizar's body fell onto the jetway even though air marshals fired their weapons from the plane as it was parked at the gate.

Air marshals are trained to reveal themselves only as "police" when they respond to a security or safety incident aboard an aircraft or in an airport. Several news reports have detailed incidents in which air marshals have revealed themselves to assist local or federal police.

On a Delta Air Lines flight in 2002, an air marshal detained a passenger on board who did not comply with security rules and pointed a gun at the passengers for 30 minutes before the flight landed. Authorities said later that the marshal acted properly, but one passenger who was briefly detained though never charged sued and received a $50,000 settlement and an apology from the government. In several other cases, federal air marshals have tackled suspects being pursued by police.

Under the Transportation Security Administration, officials say the marshal program is seeking to expand its authority from the aircraft to undercover surveillance work in airports. According to a Transportation Department inspector general's report, the marshals' cover is frequently blown by flight crew members, who are informed of their presence on the aircraft before passengers are boarded.

Skipp reported from Miami. Researcher Madonna Lebling contributed to this report.

At the Miami airport, passengers leave an American Airlines plane to be bused away after a man who allegedly said he had a bomb was killed by a federal air marshal on the jetway. The passengers were initially told to put their hands on their heads.Rigoberto Alpizar, 44, was returning to Florida from Quito, Ecuador.American Airlines Flight 924, a Boeing 757, arrived at Miami International Airport from Medellin, Colombia. The flight was to continue to Orlando.Estele Morales of Medellin holds up her boarding pass from the flight, which was carrying 114 passengers to Orlando. One terminal was briefly closed.