The 21 Afghan soldiers had been kidnapped in the remote Badakhshan Province by the Taliban, which, days later, returned their bullet-riddled bodies through tribal leaders.

Within hours, Tony Schiena, a real-life Rambo who has been called “one of the most highly trained covert operatives in the world,” was on a plane from Los Angeles to Kabul at the request of U.S. officials to put on clinics in defense tactics and teach the local conscripts the techniques he has taught to NATO Special Forces from the U.S., Canada, Germany and Croatia. For several weeks following the March 2013 incident, Schiena, at the request of the U.S. officials, instructed the Afghan Army's Criminal Investigation Division, a game, but undermanned and outgunned crew of soldiers fighting for their nation's future.

"We taught them how to survive."

- Tony Schiena, CEO of company that trained Afghan soldiers

Charged with investigating executions and murders in Taliban territory, the Afghan squad often ventured into lawless land to bring killers to justice. The abduction and slaughter of its CID team was grim testament to the need for the kind of training Schiena, 40, a former South African intelligence operative, has provided to armies around the world.

"At that time, they were being sent into mud huts to investigate Taliban murders, decapitations," said Schiena, CEO of Multi Operational Security Agency Intelligence Company (MOSAIC). "Due to Afghan government bureaucracy, they had not yet been issued any weapons. Here they were, deep in enemy territory, and they had nothing but their own bodies' capabilities to defend themselves.”

"We taught them how to survive," he added.

Schiena, whose company includes former intelligence operatives and commandos from various agencies such as the CIA, Navy SEALs, former British Secret Intelligence Service and other elite units, is one of several U.S. and foreign former special operators who have found a niche training the ragtag armies of war-torn nations to stand up to terror. Instruction in counterterrorism, counterinsurgency, unconventional warfare and defensive tactics are all in demand, and private companies such as MOSAIC have the staff and know-how to furnish it.

“We have provided forward intelligence and close protection for leaders of government and former presidents, prime ministers, sheiks and rulers," said Schiena. "We have trained Cambodian special forces in their border conflict with Thailand, and American and NATO forces in Iraq and NATO in Kabul.”

Hanan Richter, president and CEO of Houston-based Instinctive Shooting International, agrees that the need for private militaries companies is on the rise. Founded in 1999, his company offers full service tactical and anti-terrorism training, largely to the U.S. military, government agencies, Department of Defense contractors and law enforcement.

Richter is originally from Israel, and his company has specialized in pre-deployment training for U.S. forces going to the Middle East. His instructors, veterans of the U.S. military and an array of elite Israeli forces, are experienced in a variety of special-ops training, including anti-terrorism, tactical response, urban-based policing, intelligence, asymmetric warfare, explosives and aviation security. In past years, a big focus of ISI has been on training American soldiers about cultural issues and how to avoid causing unnecessary friction so casualties are minimized.

But the new, global demand has ISI teams traveling around the world to provide instruction to the forces of foreign governments. The risks for businesses like his are much greater now because training is done “very close to the enemy,” Richter said, rather than at military bases in the United States.

There also are issues with the screening process, where it can be difficult to discern who is trustworthy and who may leak confidential information and put instructors and operations at risk.

Dealing with terrorist organizations presents its own unique challenges, Richter said, noting radical Islam is gaining momentum through ISIS and other terrorist groups that want to create a caliphate state that not only dominates the West, but also any Arabic countries associated with the West. Many of those Arabic countries confronting the threat of Islamic radicalism have the oil dollars to pay for Richter's services, but growing an army from scratch is a daunting task.

“One of the challenges we have is organizing a bunch of disorganized individuals who want to fight and turn them into soldiers with the ability to fight,” Richter said.

The recruits need the training and tools that any other military would have, Richter said, including knowledge of mission operations, marksmanship skills, hand-to-hand fighting skills and basic safety. They also learn urban style fighting, team tactics, firearms, mobile force protection, ground protection, sniper training, repelling -- everything a soldier needs when fighting in an urban setting.

Michael Delamere, founder of Seattle-based Premier Risk Solutions, built his company largely on training security personnel for Fortune 1000 corporations and providing on-the-ground protection for corporate executives in areas where terrorists and drug cartels flourish.

His teams have faced down danger in Mexico, the Philippines and, more recently, in Nigeria, where the militant Islamic group Boko Haram has carved out a territory of its own in the blood of innocent countrymen. Last month, Premier Risk hosted a delegation of top security officials from Saudi Arabia for a wide-ranging training program that touched on crime, security, communications and emergency management.

Delamere, who has been in the security industry for 17 years, specializes in protecting his clients from terrorist groups such as Al Qaeda, Al Shabaab, Hamas and Hezbollah.

Although Premier Risk has provided training to Saudi clients, it monitors the threat and tactics of terrorist groups mainly to protect clients who must travel into harm's way. He said companies like his are also in greater demand than ever.

“The rise of global terrorism has created a higher threat situation to multi-national corporations who either already do or are exploring ways to operate within the borders of the countries that these terrorist groups commonly are afoot,” Delamere said.

Private companies contracting with the U.S. and foreign militaries is not a new phenomenon. During the Iraq war, the Virginia-based company formerly known as Blackwater, which was initially established by ex-Navy SEAL Erik Prince to provide training to U.S. military and law enforcement, reaped hundreds of millions of dollars in government contracts for services that included providing security for U.S. officials and CIA facilities. Blackwater, which is now defunct, found itself in legal and diplomatic hot water in 2007, when employees killed 17 Iraqi civilians in Baghdad. The incident strained relations between Iraq and the U.S., and four Blackwater employees were eventually convicted -- one of murder and three of manslaughter.

Other major private military contractors that have earned millions from government contracts for training and security in dangerous territories include the British firm Aegis Defense Services and McLean, Va.,- based DynCorp, which received contracts totaling a reported $1.4 billion to help train the new Iraqi police force and recently signed a deal worth a potential $100 million with the Pentagon to train Afghanistan's police and military.

“We have supported the U.S. Army and coalition forces in providing this specialized training since 2010,” said Randy Bockenstedt, a DynCorp executive. “We are honored to be able to continue this partnership and contribute to strengthening the Afghan national security forces.”

The United Nations, which itself spends hundreds of millions of dollars on private security contracts, in 2005 established the Working Group on the Use of Mercenaries, and acknowledged the blurred line between security services and private armies. The working group's mission, as mandated by the world body's Human Rights Council, is to monitor and report on activities of private companies offering military assistance, consultancy and security services on the international market

"The Working Group is of the opinion that there is a risk that, without proper standards and oversight, the outsourcing of security functions by the UN to private companies could have a negative effect," a 2013 report from the committee stated.

Companies interviewed by FoxNews.com stressed that they are careful to follow U.S. laws and respect local culture, but dealing with foreign and sometimes corrupt governments in embattled countries can be unpredictable and unsafe. Simon Mann, the legendary former British SAS officer who has been called the modern world's most famous mercenary, once started a series of companies with British special forces operators that provided similar services. His colorful resume shows the fine line contractors must walk between private security and the deadly side of geopolitics.

Mann's Sandline International was contracting with the governments of Angola and Sierra Leone to protect oil interests when he was accused with several others of trying to mount a coup. He was sentenced to 34 years in prison, but received a pardon in 2009, after serving nearly five years.

Mann knows of Schiena’s work, and is a fan, noting, “If you are headed for the badlands, take heed of Tony Schiena’s methods. He is the real thing.”