ON THE GULF OF OMAN—Before dawn one morning in November, four men on the deck of the MNG Resolution lifted cases of guns and body armor out of shipping containers and heaved them into a waiting speedboat.

The team zipped across the water to a tanker, where the crew pulled aside razor wire and hoisted the weapons aboard. The four men clambered up a rope ladder, and the speedboat raced back.

The 141-foot Resolution, built 30 years ago to service offshore oil platforms, has a new job: She is a floating armory and bunkhouse for contract security forces. At least a half dozen such boats ply the Gulf of Oman.

The oceangoing armories are the byproduct of global trade, high-seas piracy and national arms restrictions. Shippers traversing the dangerous waters off Somalia want armed guards to protect their cargo and crews, but most countries won’t let private security forces bring guns into their ports. So ships like the Resolution have appeared to cache weapons offshore for security companies and ferry their guns and guards to vessels needing protection.

The shipping industry once regarded armed guards on vessels as too dangerous. But a spate of Somali pirate attacks several years ago changed that thinking. Every month now, thousands of weapons pass through the Indian Ocean and hundreds of security teams rotate on and off ships in the Gulf of Oman. A similar trade goes on in the Red Sea and off Sri Lanka.

Sovereign Global, a U.K.-based security company, can accommodate 200 people in the armory it operates off the coast of Djibouti on the Horn of Africa. The MV Mahanuwara, a 40-year-old supply ship that works off the southern Sri Lankan port of Galle, can hold a thousand guns and the ammunition needed to use them.

The international shipping industry spent around $1 billion on armed guards and equipment in the Indian Ocean in 2013, according to Oceans Beyond Piracy, a nonprofit group based in Colorado. Attacks in the high-risk area have fallen precipitously in the last two years. The last hijacking and ransom of a merchant vessel by Somali pirates was in 2012.

The proliferation of armory ships is fanning concerns. There is no official record of how many armories exist or who operates them. Nor are there any regulatory bodies overseeing such enterprises in international waters. International standards for private-security firms don’t address floating armories. In theory, the ships are overseen by the nations whose flags they carry, but some in the industry say vessels don’t always declare they are armories.

The regulatory environment allows “companies whose operators may not be licensed to use or transfer weapons and ammunition to act with impunity,” said a December report by the Omega Research Foundation, a British nonprofit group focused on the arms industry. The report raised concerns about how armories store and account for the weapons they hold.

“We saw floating armories were being done mostly quite badly and largely illegally, and we felt we could do better,” says Mark Gray, co-founder of the company that operates the Resolution, MNG Maritime Ltd.

Critics say the armories themselves could be targets for attack by pirates or terrorists. India, fearful that armories present a security risk, is pushing the International Maritime Organization, a United Nations agency, to develop guidelines for regulating the industry. In a 2012 report, the U.N. Security Council committee on Somalia and Eritrea said that the armory business was “uncontrolled and almost entirely unregulated, posing additional legal and security challenges for all parties involved.”

In October 2013, the MV Seaman Guard Ohio, an armory operated by Washington, D.C.-based AdvanFort International Inc., drifted into Indian waters. Indian authorities seized the vessel and arrested its crew and passengers. Onboard were 35 assault rifles and 5,680 rounds of ammunition, Indian officials said. Last July, AdvanFort said the charges against the 35 men on board had been dropped after eight months. AdvanFort couldn’t be reached for comment.

Mr. Gray says he favors greater oversight of the industry. MNG Maritime has an arms-export license from the British government. “At the bottom end of a market, all you need is a ship,” he says. “There were, and are, some real bucket shops.”

Mr. Gray is a former colonel in the U.K.’s Royal Marines. In 2010, he spent three months patrolling the coast of Somalia in command of a naval task group. When he retired, he says, he thought about setting up a maritime-guard service but saw greater opportunities in running an armo

He teamed up with a university friend, Nicholas Holtby, a former investment banker prone to seasickness but eager to deploy his risk-management skills in a new venture. In November 2013, they launched their first vessel, the Sea Patrol. Months later, they upgraded to the Resolution.

The company says it plans to expand further. Whenever a new booking comes in to the cramped office aboard the Resolution, the computer chirps: “You’re gonna need a bigger boat!” —a line from the movie “Jaws.”

Getting on board the Resolution requires an 18-hour boat ride from the Emirati port of Sharjah, around the spur of Oman, to a spot 25 miles off the coast.

Once aboard the armories, most guards can’t wait to get off. They are employed not by the armories, but by separate security companies, which often pay them at a lower rate, or not at all, for time spent before boarding a tanker or cargo ship passing through the high-risk area.

“I’ve been in lots of hideous places,” said Neal Fearn, a former Royal Marine and maritime-security guard who now drives the speedboat that shuttles guards to and from the Resolution. “One armory, I don’t know who was running it, but it wasn’t pretty. There was no air conditioning, no communications. It was dirty.”

As the industry grows, competition is pushing up standards.

The Resolution has Wi-Fi, and there is a gym and shaded relaxation area on top of the locked shipping containers holding the guns. A sign pinned to a crate of weights outlines the latest crew challenge: the Resolution 1000, a punishing series of 10 exercises to be repeated 100 times.

The security guards sleep six to nine in a cabin, stacked in narrow bunk beds three high. Luggage is stored in racks out on deck. Toilet seats were brought aboard as a concession to female visitors.

At 4:00 in the morning of Nov. 19, Mr. Fearn was at the helm of the speedboat to ferry a team of guards to a liquefied-natural-gas carrier lighted up in the distance.

The crew ran six trips that morning, shuttling guards and weapons to and from tankers and container ships traveling in and out of the high-risk area.

The labor is physical. A box of weapons and ammunition can weigh 66 pounds, boxes of body armor and other equipment even more. In the summer, temperatures can soar above 100 degrees Fahrenheit, and during the monsoon season the seas can be rough.

Armories typically charge between $1,500 and $5,000 to run a shuttle to a passing ship, and sometimes charge extra for room and board.

“There’s been days when we’ve had 10 or 12 transfers,” said Robert “Bones” Henzell, who was on the Resolution’s bridge at the start of a midnight shift standing watch. “It’s pretty much a 24-hour job.” Although the Resolution floats outside of the area seen as at high risk from pirates, the four-man security team—all veterans of the British military—keeps a round-the-clock watch.

For the guards rotating on and off the armory, there are plenty of idle hours. The following morning, several men passed time fishing for dorado and flying fish. The boatswain, a Filipino sailor with a mohawk and soul patch, was the only one catching anything. No one in the group has ever had an encounter with pirates.

A few weeks earlier, the crew had spotted a small boat speeding toward it. The security team scrambled to the bridge, pulled on their body armor and held their weapons above their heads as a warning signal.

“It was four guys and a girl in a bikini with 10 fishing lines off the back,” recalled Paul Mutter, who leads the security team and is in charge of inspecting and maintaining the weapons.

Mr. Mutter said the armory inspects each weapon when it arrives, then logs it into the company’s computer database.

Practices vary across the industry, partly because of the lack of oversight. Sitting in international waters, the armories have mostly existed in “a horrible gray area,” says one shipping lawyer.

Even within the industry, some people acknowledge that more needs to be done to improve transparency and oversight.

“I think globally there is a huge regulatory gap,” says Paul Gibson, director at the Security in Complex Environments Group, a U.K.-based industry body focused on working with government to develop standards for the private-security sector. “There’s a complete lack of transparency about a number of floating armories being operated.”

MNG Maritime’s Mr. Gray says the lack of oversight sometimes creates problems, including getting visas for security guards to pass through the region’s ports. “About twice a month we have issues, and you have no recourse to anyone,” he says.

Standing on the deck of the Resolution, hours after finishing an assignment that took him from India to the Persian Gulf, security guard Jason Cunningham recalled being stuck on an armory for three weeks after the port of Khor Fakkan in the United Arab Emirates was closed to security guards last year.

“Some floating armories should really be sunk to the bottom of the ocean,” he said. “We don’t ask for much: a gym, some Wi-Fi, decent food.” He said the armory he was stuck on had none of those things, and at times was so overcrowded that guards had to find places to sleep out on the deck.

The governments of some coastal nations are wary of armories off their shores. Restrictions imposed by some port cities are the reason that crew members have to travel all the way around the tip of Oman to reach the armory ships.

The decline in attacks over the past two years has generated some uncertainty in the budding industry.

Security guards, for their part, say they believe pirates still pose a threat. Rajiv Upadhyay, a 37-year-old security guard staying on the Resolution in November, recounted how a ship he was stationed on was followed for about 10 miles off the coast of Somalia last January. It wasn’t clear whether the pursuers were pirates.

Last May, a liquefied-petroleum-gas carrier that security guard Ashok Kumar was helping to guard en route from Sri Lanka to Saudi Arabia was approached at high speed by another vessel, prompting Mr. Kumar to brandish his gun. Again, it wasn’t known whether they were pirates.

Piracy is becoming a problem in other areas. Data from the International Maritime Bureau, an affiliate of the International Chamber of Commerce, show that sea attacks now are more common off oil-rich West Africa than off the Somali coast. The data also show that the hijacking of vessels to siphon off fuel cargoes is on the rise in the waters near Indonesia.

But armed guards can’t operate in those areas, partly because the trade routes pass closer to land, giving coastal nations more territorial jurisdiction.

So for now, the armory business is confined to the waters off Somalia—and useful only as long as the shipping industry remains fearful of attacks, crews held hostage or killed, and ransom demands.

Mr. Gray says even the industry’s optimists wonder: “If there are no attacks for six months to a year, where is the industry going to be?”

Write to Sarah Kent at sarah.kent@wsj.com and Cassie Werber atcassie.werber@wsj.com