Dramatic new drone video of the Niger ambush that killed four American soldiers shows U.S. forces desperately trying to escape and fighting for their lives after friendly Nigerien forces mistook them for the enemy.

It describes how the fleeing troops set up a quick defensive location on the edge of a swamp and -- thinking they were soon to die -- wrote messages home to their loved ones.

The video, released by the Pentagon with explanatory narration, includes more than 10 minutes of drone footage, file tape and animation that wasn't made public last week when the military released a portion of the final report on the October attack. The video depicts for the first time the harrowing hours as troops held off their enemy and waited for rescue.

There were 46 U.S. and Nigerien troops out on the initial mission in the west African nation, going after but failing to find a high-value militant, then collecting intelligence at a site where the insurgent had been. The team was heading home when it was attacked by more than 100 militants just outside the village of Tongo Tongo. During the firefight, a number of the Nigeriens escaped by truck, but four U.S. and four Nigerien troops were gunned down.

The video depicts seven American forces and four Nigeriens fleeing on foot, under heavy mortar and small arms fire. They crossed through a swamp, and at about 12:50 p.m. on Oct. 4, they hunkered down at the edge of a clearing.

"They wrote short messages to loved ones on personal devices, believing they would soon be overrun," the video narrator says. Just 21 minutes later, two unarmed U.S. drones arrived overhead and established contact with the team, and after another seven minutes, two French Mirage aircraft screamed across the sky at a low altitude, in a show of force to frighten the enemy. A number of militants can be seen moving quickly away.

After nearly three hours of waiting, French helicopters arrived, and an American soldier can be seen on the video moving out into the clearing, waving a U.S. flag to help the aircraft locate them.

The video shifts to an overhead view near the team waiting at the clearing, and two trucks can be seen moving into the frame. The drone video zooms in on them, and flashes of gunfire light up the screen.

A friendly Nigerien response force had arrived to help, and mistook the team for enemy insurgents. For 48 seconds they fired on the team with automatic weapons, until they were able to confirm their identity. No one was injured in that brief gunfight.

During the same time, U.S. Africa Command had launched a search and recovery mission for the one U.S. soldier who was missing, Army Sgt. La David Johnson. The bodies of the others who were killed had been recovered, but Johnson, 25, of Miami Gardens, Florida, could not be found.

About two days later, Nigerien military forces located Johnson's body, in the heavy brush under a thorny tree, where he had hidden and fought in his final stand against the enemy. The video shows the Nigeriens carefully carrying his body to the back of a waiting truck, and later transferring him to a helicopter.

Also killed in the ambush were: Staff Sgt. Bryan C. Black, 35, of Puyallup, Washington; Staff Sgt. Jeremiah W. Johnson, 39, of Springboro, Ohio, and Staff Sgt. Dustin M. Wright, 29, of Lyons, Georgia. Two American soldiers and eight Nigerien forces were wounded.

The investigation of the incident by U.S. Africa Command found there were a number of failures associated with the mission, but none directly caused the enemy ambush. It also described multiple acts of heroism, as the members of the outmanned and outgunned Army Special Forces team struggled to protect and rescue each other.

Defense Secretary Jim Mattis has directed the Army and U.S. Special Operations Command to conduct reviews, which could result in awards of valor or disciplinary actions.

Navy Capt. Jason Salata, spokesman for Special Operations Command, said Mattis requested a review "of the training and policies pertinent to Special Forces soldiers that may impact their ability to effectively train foreign partners."

He said the review, which began immediately, will look at counterterrorism operations, personnel policies that affect units preparing to deploy and any administrative requirements that are relevant.