A heartbreaking video posted online Thursday showed Afghans handing a baby to American troops at the Kabul airport to escape the Taliban.

Fox News obtained the somber footage depicting an adult handing a child off to a service member over a barbed fence at the Kabul airport, which is currently surrounded by Taliban militants.

Maj. Jim Stenger, a spokesperson for the U.S. Marine Corps., confirmed on Friday to Fox News that the service member who received the child is a U.S. Marine and that the child was taken to medical care and has now been reunited with family.

AFGHANISTAN COLLAPSE: STATE DEPT SAYS 6,000 PEOPLE PROCESSED FOR EVACUATION AT KABUL AIRPORT

"I can confirm the uniformed service member depicted in the video is a Marine with the 24th Marine Expeditionary Unit," Stenger said. "The baby seen in the video was taken to a medical treatment facility on site and cared for by medical professionals."

"I can confirm the baby was reunited with their father and is safe at the airport. This is a true example of the professionalism of the Marines on site, who are making quick decisions in a dynamic situation in support of evacuation operations."

AFGHANISTAN COLLAPSE: STATE DEPT SAYS 6,000 PEOPLE PROCESSED FOR EVACUATION AT KABUL AIRPORT

The fence was crowded with people desperate to get into the airport and escape the country as the Taliban continues to consolidate power.

The shocking scene took place as the fallout of Biden administration's bungled troop withdrawal continues to unfold in Afghanistan.

Thousands of Americans are trapped in Kabul and the Biden administration is continuing to work to get them out. The State Department said on Thursday that 6,000 Americans have been processed for evacuation.

Two thousand Americans were evacuated in the last 24 hours, per the Pentagon.

"Since Aug. 14 we’ve airlifted 7,000 total evacuees. I can also confirm there are 6,000 people at the airport who have been fully processed by our consular team and will soon board planes," State Department spokesman Ned Price told reporters Thursday.

CLICK HERE TO GET THE FOX NEWS APP

Price said that American citizens and green-card holders are getting priority to board the U.S. planes and that the U.S. has "significantly expanded" the amount of people being flown out.

The U.S. has been scrambling to get allies and Americans out of Afghanistan as the Taliban has taken the country and secured the capital of Kabul ahead of the planned U.S. withdrawal at the end of the month. The Taliban takeover has led to frantic scenes at the airport as Afghans have tried to board planes to get out.

There have been multiple reports of people being blocked from getting to the airport, while Fox News has reported on Taliban beatings of people trying to make their way.

Fox News' Adam Shaw contributed to this report.