(CNN) A British-flagged ship owned by a Swedish company was seized by Iran last week. Caught in the middle are 23 seamen who have nothing to do with any of the three countries.

The current crisis in the Strait of Hormuz has put a spotlight on the murky world of international shipping, where shipowners can register and re-register their vessels within minutes, turning their crews into pawns in a game of diplomatic chess.

"If you've got a credit card, and you've got 15 minutes, you can re-register your ship under any flag you want," said Michael Roe, a professor of maritime and logistics policy at the University of Plymouth.

Under marine laws, every merchant ship has to be registered with one country. While the UN Convention on the High Seas says a vessel should have "a genuine" link with its flag state, current rules allow ships to sail under almost any flag regardless of their ownership, as long as they pay the registration fee. This is known in the shipping industry as a "flag of convenience."

That roughly 40% of the global fleet is registered in Panama, Liberia and the Marshall Islands -- three countries that together own just 169 ships -- shows how common the practice is.

"Without being too insulting, these are totally irrelevant countries when it comes to shipping, except they've got cheap flags with low standards of regulation," Roe said.

The crew of the UK-flagged tanker Stena Impero got caught up in the middle of a diplomatic spat.

Registration decisions are mostly driven by commercial reasons.

"One way to reduce costs is to choose a flag like Mongolia," Roe said. "It's got no coast, no ports, no real direct relevance to shipping, but it offers a flag that's cheap and low standards, therefore it is good for shipowners."

According to the United Nations Conference on Trade and Development, 265 vessels with a total cargo capacity of 664,000 tons are sailing under the Mongolian flag.

It works the other way too. Greece, a shipping superpower that owns the largest fleet in the world, is sailing most of its ships under a foreign flag, because shipowners want to avoid Greece's high tax rates.

Having a large flag is prestigious, but also lucrative, which is why countries compete fiercely for ships to register with them.

"It's quite common for shipping companies to shop around for a flag which suits them," said Richard Coles, senior research fellow at the Institute of Maritime Law at the University of Southampton.

Coles, a long-time shipping lawyer, said the term "flag of convenience" is considered somewhat derogatory in the shipping industry, because under international conventions, every ship has to comply with common safety, environmental and labor law standards, regardless of its flag.

"Now here is the rub," Coles said. "A British-flagged vessel or an American-flagged, these are flag states that rigorously enforce their safety rules, whereas if you have a small Caribbean island which doesn't have a large civil service and the means of enforcing the rules, obviously, the standards are not likely to be as good," he said.

But the flag decision can have a huge impact on crews. Stena Impero, the Swedish-owned tanker that was seized in Iran last week, was almost certainly targeted because if was flying the British flag.

Iran captured the vessel as a tit-for-tat after its own tanker was detained in Gibraltar because it was carrying Iranian oil to Syria in breach of EU sanctions.

The crew aboard Stena Impero comes from India, the Philippines, Russia and Latvia, countries that are mostly not involved in the current spat between the Iranians and the West.

It's a fairly typical makeup: India, Russia and the Philippines are among the top five countries with the highest numbers of seafarers.

David Heindel, the chair of the seafarers section at the International Transport Workers' Federation (ITWF), said the risk crews are facing in the Strait of Hormuz is "totally unacceptable."

The ITWF has been campaigning against flags of convenience for decades, saying the practice puts crews at risk of exploitation.

"On flag of convenience vessels non-national seafarers simply don't have the same rights that national seafarers would have if they were employed," he said.

When a ship registers with a country, it assumes its nationality and becomes governed by that state's laws. In return, the country is theoretically responsible for the vessel and its crew regardless of their nationalities.

But Heindel said seafarers sometimes find it difficult to get help from their vessel's flag state if they are not its citizens. That is especially true when the flag belongs to a developing country with little diplomatic power and no real labor protections.

At the same time, Heindel said, the diplomatic missions of the seafarers' own countries may not be able to help either. It may be their citizens who are involved, but they have no power over the vessels.

To make the matters even more complicated, ships are allowed to switch flags and re-register as they please, even mid-journey.

In a conflict situation, security becomes a concern and re-flagging could provide respite.

"For example, during the first Gulf War, quite a few [Kuwaiti] vessels were re-flagged under the UK flag and some were re-flagged under the United States flag in order to gain protection of the those countries," Coles said.

Insurance can play a role too. Lloyd's List, a shipping news journal, reported last week that the war risk insurance costs for British-flagged ships have gone up by tens of thousands of dollars per trip since the Stena Impero capture, giving owners incentive to ditch the UK flag.

The British-flagged tanker Stena Impero and its 23 crew members were seized by Iran.

According to the spokesperson of Stena Bulk, Stena Impero's owner, the British and Swedish governments are leading the diplomatic efforts to have the ship and the crew released, keeping the Russian, Latvian, Philippine and Indian embassies informed.

Erik Hanell, Stena Bulk's CEO, said he wouldn't speculate on whether the ship's flag played a role in the seizure.

He said that while Stena Bulk is Swedish-owned, the company operates "all over the globe" and has "a big presence in Britain."

"There can be many reasons why you have another flag," he added.

Correction: This story has been updated to reflect the correct tonnage of the vessels sailing under the Mongolian flag.