NEW YORK, FEB. 11 -- The 11-hour odyssey of Lufthansa Flight 592 and its 104 passengers and crew ended peacefully at John F. Kennedy International Airport here this afternoon as an armed man surrendered without incident after hijacking the Cairo-bound plane as it left German airspace and ordering it diverted to the United States.

After hours of confusion about the suspect's identity, law enforcement officials said tonight that he was Nebiu Zewolde Demeke, 20, a native of Ethiopia living in Morocco.

FBI authorities said he grabbed a flight attendant shortly after the twin-engine Airbus 310 left Frankfurt, Germany, at 4:45 a.m. EST, displayed a loaded handgun and demanded that the flight be routed to New York and that he be granted political asylum after landing.

About an hour before the plane arrived here at 3:50 p.m., negotiators from the New York Police Department and FBI said, they established contact with the gunman in the cockpit and persuaded him to surrender. Earlier, German authorities and pilot Gerhardt Goebel had said the hijacker assured them that he would surrender on arrival in the United States.

The gunman handed his weapon to Goebel, who displayed it at the cockpit window so authorities could see it, then left the plane with his hands up minutes after the plane taxied to a halt in a remote area of the busy airport.

"This is a hijacking that could have ended in disaster," James Fox, assistant FBI director, told reporters at the airport. "But we had the time to put into effect a plan that we had practiced over and over again . . . . Today, it worked perfectly."

The incident renewed concern about security procedures at Frankfurt Airport, busiest on continental Europe. The airport was criticized severely after a bomb smuggled through Frankfurt blew up Pan Am Flight 103 over Lockerbie, Scotland, in 1988, killing 270 people, including 189 Americans.

Assistant U.S. Attorney Thomas Roche said Demeke would be arraigned today in U.S. District Court in Brooklyn on charges of aircraft piracy and interfering with a flight crew. The charges carry a maximum sentence of 20 years to life in prison.

Fox said German authorities have requested that Demeke be extradited.

Passengers said the hijacking began as the plane crossed the Alps into Austria soon after takeoff. They said the gunman apparently went into a restroom between the first-class and business-class sections, then burst out wearing a black woolen ski mask and waving an automatic pistol before pushing the flight attendant into the cockpit.

Some of the 94 passengers, who included at least seven Americans, described him as slight, no taller than 5-foot-6.

According to passenger Theodore Gouberner, a Venezuelan living in Stuttgart, Germany, Goebel announced over the intercom: "Ladies and gentlemen, there is a young man here who does not want to go to Cairo. He has a gun pointed at my head and wants to go to Hanover and later to the North Atlantic."

Several passengers described the scene in the plane as remarkably calm during the trip that included a stop in Hanover, Germany, where the plane was refueled before an eight-hour flight to New York. They said emotions occasionally ran high.

"About four hours into the flight, a stewardess said to me that this guy is really nuts, he doesn't have any political agenda," said William Matthews, 43, a painter from Denver. "She said he's just off his rocker. That's when I got scared."

Matthews said he and other passengers discussed overpowering the gunman once the plane landed.

"We knew he was a little guy," Matthews said. "We knew he was on his own. We knew he only had one gun."

The gun was a starter's pistol that fired only blanks, a law enforcement source told Associated Press tonight on condition of anonymity.

Goebel said the gunman initially was "extremely nervous and very high-strung." When he entered the cockpit, Goebel said, the gunman demanded to go straight to New York. "We had a hard time convincing him that we didn't have enough fuel," Goebel said.

Throughout the incident, however, Goebel said, he continued talking to the man and "managed to convey to him that we were his allies." Just before leaving the plane, Goebel said, the man wrote him a note saying "Thank you. Here's yours. Tschuss" -- German for "goodbye." He also left Goebel his hat, and Goebel said he gave the man his sunglasses in exchange for the handgun.

According to a tape of air traffic control radio by a ham radio operator in Hanover, the hijacker had told Goebel that he had attempted to emigrate but had been refused entry to the United States.

On the ham operator's recording, Goebel told controllers: "If we do everything he says, he will not use any force. When he gets off in New York, he will voluntarily give himself up to the authorities."

German state prosecutor Klaus Bamberg said officials agreed to the hijacker's request because "he said if his demands were not met, he would begin shooting passengers. The pilot fears for his life and the lives of his passengers."

Security officials said they had no idea how the pistol was smuggled aboard. Klaus-Dieter Guettler, chief of air security for the Hessian Technology and Economics Ministry, which until last month was in charge of security at Frankfurt Airport, said in an interview that "a pistol is simple to see in the X-ray equipment we use at Frankfurt."

A law enforcement source, speaking on condition of anonymity, told Associated Press that the hijacker evaded airport security by hiding the gun under his hat, placing the hat on a table as he passed through a metal detector and picking up the hat as he headed to the plane.

On Jan. 1, responsibility for checking passengers and hand luggage at Frankfurt was shifted from local authorities to the Federal Border Guard. Other German airports elected to retain local controls or to use local and federal police.

After the Pan Am explosion, Germany came under intense pressure to improve airport security.

"The improvements were especially dramatic in the area of checked luggage," Guettler said. "In the areas of hand luggage and searching of passengers' bodies, there has been no great change, except that we have more security personnel." About 700 security officials work at Frankfort Airport.

But U.S. officials remained dissatisfied, and the Federal Aviation Administration requires U.S. airlines at Frankfurt and other European airports to conduct security checks far more strenuous than those offered by Lufthansa and other non-U.S. carriers.

A security official at a U.S. airline in Frankfurt said "a huge and frankly quite dangerous gap" remains between FAA standards and security measures in place for non-U.S. airlines at Frankfurt.

All passengers at Frankfurt must submit to a body search with a hand-held metal detector and must pass through a metal detector similar to those used in U.S. airports.

A spokesman for Lufthansa said tonight that, in response to a passenger's request, all those aboard Flight 592 would be awarded full frequent-flyer miles.

Correspondent Marc Fisher reported from Berlin. Special correspondents Eleanor Randolph and Rachel Stassen-Berger contributed to this report.