STOCKHOLM, Sweden (AP) _ Thousands of ships sail under flags of countries they never visit. Shipowners say that allows them to bring down costs but unions say the real bottom line is unsafe ships and poorly trained crews.

Last weekend's fire on the Bahamas-registered Scandinavian Star, which trapped hundreds of passengers on an allegedly unsafe ship, has prompted a review in Scandinavia of so-called flag-of-convenience vessels.

The Swedish Seamen's Union says they are dangerous and is trying to get them banned from Swedish ports. Shipowners say the bunting on the stern has nothing to do with the ship's safety.

Responding to the deadly fire, a maritime commission from Norway, Sweden and Denmark decided to tighten inspection procedures for foreign-flagged ships in Scandinavian waters.

About 170 people were killed on the 20-year-old ferry during the overnight trip from Norway to Denmark. It was one of the worst passenger ship disasters on record.

Passengers charged that the Filipino and Portuguese crewmen on the Scandinavian Star were poorly-trained to deal with the emergency and could not overcome their language barrier.

The ship's Norwegian captain, Hugo Larsen, stated at a maritime inquiry in Copenhagen, Denmark, on Wednesday that the ship was safe and the crew adequate.

But the seamen's union said that because the ship was registered in the Bahamas, it was not required to undergo the strict inspection procedures required for Scandinavian vessels.

They said that shipowners often register their vessels in Panama, Liberia and other countries to circumvent the stringent safety rules of their own countries and to take advantage of cheap labor.

Filipino seamen work for as little as $1.50 an hour on Nordic lines, compared with about $10 an hour for a Scandinavian.

''It's a bit like 19th-century slave vessels,'' said Lennart Johnson, an official at the Swedish Seamen's Union. The result is ''low-cost crews with poor education and low safety.''

The Swedish Seamen's Union has a reputation for militancy and is lobbying with legislators to toughen Swedish laws against vessels flying flags of convenience. Johnson said about 2,000 merchant ships flying flags of convenience dock every year in Swedish harbors.

Others disagree with Johnson's allegations.

''Some of the best operated ships in the world - and some of the worst operated - fly flags of convenience,'' said David Larner of Lloyds of London, the insurance company.

''Underwriters look first and foremost at the operators. If he's good, with a good track record, then his premiums will reflect that,'' Larner said in a telephone interview.

But he also said that new operators with convenience registrations ''make us look more carefully'' before issuing policies.

Tom Bringsvaerd, managing director of Fred Olsen Line, a Norwegian ferry and cruise company, dismissed claims that service or safety is affected by the hiring foreign seamen.

''They get the same training and same qualifications as Scandinavians,'' said Bringsvaerd.

He said Norwegian shipowners were adopting flags of convenience to cut costs and remain competitive.

Johnson dismissed the claim that local ferry companies were not competitive as ''nonsense.''

He said that Swedish ferry companies were immensely profitable.

Bringsvaerd accused the Swedish union of exploiting the Scandinavian Star disaster to push for tighter regulations that will benefit its own members.

''They are misleading the public and using this tragic accident to promote their own subjective interests,'' he said.

The Portuguese trade unions representing crewmen on the Scandinavian Star also rejected the criticism. ''We understand that the Nordic unions are struggling to end foreign working aboard the ships, but we don't understand that they could be so selfish to take advantage of a disaster,'' the Portugese union said in a statement issued in Lisbon.

About 10,000 vessels worldwide fly flags of convenience, Johnson said. Other experts said the figure varies, but all agree that the practice is common.