%mlink(STRY:; PHOTO:STO103-090202; AUDIO:148%)

VAESTERAAS, Sweden (AP) _ A Swedish man suspected of planning to hijack an airliner was ordered Monday to remain in custody while prosecutors prepare formal charges in a case that has heightened fears of terrorism ahead of the anniversary of the Sept. 11 attacks.

A district court judge ordered Kerim Sadok Chatty, 29, detained on preliminary charges of planning to hijack a plane and illegal possession of a weapon, but he rejected counts of planning to sabotage an airplane or airport.

Investigators have said they are in contact with foreign authorities and are looking for links between Chatty and terror groups, along with other lines of investigation.

But prosecutor Thomas Haeggstroem said the motive was still being investigated and he avoided any suggestion of a link between the suspect and any broader plots or terrorism.

``I have no evidence concerning crashing the aircraft,'' Haeggstroem said, declining to offer more details.

Defense attorney Nils Uggla has strongly rejected any association with terrorism and said that Chatty _ a Muslim convert whose mother is Swedish and father is Tunisian _ can explain why he had the gun in his carryon bag and denies any intention of hijacking the plane.

But, he said, he could not elaborate because of a gag order.

``He's feeling pretty bad. His hope is that this will resolve itself,'' Uggla said after the 90-minute hearing, which was held amid tight security and closed to the public.

Wearing a gray T-shirt, shorts and sandals, Chatty spoke only to confirm his presence in the courthouse before his lawyer addressed Judge Thomas Wallin.

Police insisted their case against the former amateur boxer and flight student had gotten stronger since his arrest Thursday, but they have revealed little information, including details about the gun. The weapon was found in Chatty's toilet-articles bag in a routine check as he boarded a Ryanair flight to London to attend an Islamic conference in Birmingham, England.

``The suspicions have been strengthened during the course of the investigation,'' police spokesman Ulf Palm said, without giving details.

Haeggstroem said Chatty has confessed to possession of a weapon, and the investigation ``now aims at finding the reason he had it with him.''

He said the national security police agency known as SAPO was taking over the investigation from the local authorities in Vaesteraas, 60 miles northwest of the capital, Stockholm, although he would remain as prosecutor.

In his decision, the judge agreed with prosecutors that Chatty posed a risk of escaping, destroying evidence or complicating the investigation. He also agreed the suspect, who has previous assault and theft convictions, could continue his criminal activities.

Haeggstroem has a Sept. 16 deadline to file formal charges but said he could file for an extension. Chatty, who faces a maximum sentence of life in prison if convicted of the hijacking charge, was to be moved to a prison in Stockholm, but authorities would not say when.

Chatty briefly attended a South Carolina flight school starting in September 1996, but he flunked out a few months later, school officials have said. At least three of the hijackers involved in the Sept. 11 attacks attended or visited flight schools in the United States.

FBI officials visited the school on Saturday, but Chatty's 19-year-old sister, Sarah, said his studies there were ``just a hobby.''

The hijackers took their lessons in 2000, and German investigators say the plot to fly hijacked planes was probably not conceived until 1999 _ well after Chatty took his flight courses.

It is not clear when Chatty converted to Islam, but his lawyer has said it was recently.

A 36-year-old naturalized Swedish citizen of Lebanese origin who has been linked to plans to set up a terrorist training camp in Oregon said he spent time with Chatty in prison in 1997 and taught him how to pray properly.

The man, who was not indicted in the U.S. case and denied any involvement, said he admired al-Qaida leader Osama bin Laden but never discussed that with Chatty.

Instead, he said they played at the PlayStation or studied Arabic.

``He's a nice guy and he doesn't know anything about terror or anything like that,'' the man, who declined to be identified, said. ``I think he's a simple man who made a mistake.''

Chatty's relatives said he opposed violence and that they were confident he had a reason for carrying the gun that had nothing to do with hijacking plans.

Several passengers already aboard the aircraft were evacuated after the gun was found Thursday.

Police searched the cabin and luggage compartment and the plane took off several hours late without the suspect and other Muslims with whom police initially believed he was traveling. The others were released after questioning.

Airports in Sweden, a Scandinavian nation of 8.9 million people, have tightened security since Sept. 11.