Test Text1 plain If you think plundering pirates and the high seas sounds more look a summer blockbuster than reality, we're about to bring you inside a very dangerous real world, where a war is... See More
Test Text1 plain If you think plundering pirates and the high seas sounds more look a summer blockbuster than reality, we're about to bring you inside a very dangerous real world, where a war is raging between real-life pirates, and the private security companies whose armed guards protect valuable ships with billions of dollars at stake. Abc's dan harris reports. Reporter: It's a friday afternoon in the middle of the indian ocean, one of the busiest shipping lanes on earth, an area infested with somali pirates. At the top of your screen, you can see a pirate 65 heading toward this american shipping vessel. I'll give you a weapon. Stand by. Reporter: The commercial ship is carrying a crew of american security guards, former navy seals. Okay, let's go. The team leader orders a warning shot. Go ahead. Warning shot. But look what happens instead, a massive blast of gunfire. The pirate ship is perhaps hit or killed, crashes into the side of the ship. By the time it was over, an unknown number of pirates may have been killed or injured. This video offers a rare glimpse inside a largely hidden war, being fought between somali pirates and private security companies, with american lives and billions of dollars at stake. Now allegations that these maritime mercenaries are out of control. Allegations that are even coming from people inside the industry. We absolutely fear that cowboys are out there. As a matter of fact I'm certain that there are. Reporter: Over the past few months, "nightline" hase gon inside this shadowy high-seas conflict, traveling from somalia, to miami, to virginia, gaining special access, including to the company's whose men were involved in this shoot-out. So as you watch this, you believe your guys did the right thing at every step? Absolutely. Ceo of trident security said what you can't see is that as soon as his men fired warning shots, the pirates opened fire. If somebody was to look at that and make a blind statement of this is indiscriminate killing, they don't know what's going on. Reporter: He argues that his men, who train here, in the waters off virginia beach, are up against a determined sophisticated enemy. How bad is it out there? It's really bad because the seamen are scared to death. How sophisticated are the pirates? Very sophisticated and they're getting better. Somali pirates have carried out 170 successful hijackings and taking hostages. He has a full mock-up of a ship that he uses for training. He shows me the shockingly thin ladders that the pirates use to board. They're nimble enough to climb on something like this. Absolutely. He also shows me the arsenal his men fight back with. That's what he use for all teams that are out there. Reporter: On this video, you get a fascinating look at what it's like when piras take over a commercial ship. One of the crewmen is filming, as the pirates bargain with the captain. No, no money. Money should be from company. Then, as they await their ransom money, they settle right in, cooking in the galley, even sleeping in the crew's bed. But they are not always this peaceful. Last year, pirates seized a yacht piloted by four americans, and murdered them. We were able to go inside somalia, a place of famine, poverty, and lawlessness, one of the last remaining safe haferns on earth for al qaeda. All you need is 30 seconds on the ground here to see how inhospitable this terrain is to any sort of life. Is this one of the most dangerous places in the world? I really believe it's one of of the most violent places, yes. Reporter: Look around, the poverty is epic. Job opportunitienon-giexistent. That's why so many turn to piracy. Close to a billion dollars on guards. That's attracted security firms with varying levels of discipline from all over the world. ♪ look at this music video legedly made by russian marines. They blow up a pirate flotilla and then do target practice on it. A rocket-propelled greanade. -- Reporter: Kevin dougherty says elements of his own industry are totally out of control. We receive a lot of resumes from individuals and the subject line is, put me in, coach, I'm ready to kill a pirate. Reporter: He can see there may be companies who need to be reigned in. He points out and the state department confirms, there have been no successful pirate attacks on ships protected by armed guards. So do not expect this controversial industry to disappear anytime soon. For "nightline," this is dan harris, in virginia beach.
This transcript has been automatically generated and may not be 100% accurate.