(CNN) A stampede during one of the last rituals of the Hajj -- the annual Islamic pilgrimage to Mecca -- has killed more than 700 people and injured nearly 900 others in Saudi Arabia.

The stampede occurred Thursday morning during the ritual known as "stoning the devil" in a tent city in Mina, about two miles from the holy site in Mecca, Islam's holiest city.

Footage obtained by CNN Arabic shows a disturbing scene. Bodies piled upon bodies, a few moving, but most appearing lifeless. Workers in hard hats and reflective vests can be seen pulling dead bodies away to get to those who are still alive.

The video captures the cacophony of shouts amid the chaos.

Ethar El-Katatney, a pilgrim who was near the stampede site about five hours after the surge happened, said she walked past ambulances carrying bodies of victims. She said she saw numerous police officers and medical personnel in the area.

JUST WATCHED Hajj: The pilgrimage to Mecca Replay More Videos ... MUST WATCH Hajj: The pilgrimage to Mecca 01:39

"I saw the ambulances, I saw bodies. ... At least 20, 30 ambulances passed me by," she told CNN by phone.

The incident is the deadliest disaster at Mina since 1990, when 1,426 people died.

Civil defense authorities said the latest death toll is 717, with 863 people injured, but the numbers have been climbing steadily. Officials deployed 4,000 workers, along with 220 ambulances and other vehicles, to Mina in response to the disaster.

In the ritual, crowds of pilgrims throw stones at three pillars in a re-enactment of when the Prophet Abraham stoned the devil and rejected his temptations, according to Muslim traditions.

Crown Prince Mohammad bin Nayef bin Abdulaziz held an emergency meeting to discuss the stampede, according to the Saudi Press Agency.

فيديو: خطة عاجلة تطبقها مستشفيات المشاعر المقدسة لفرز الحالات المصابة بتدافع منى #الإخبارية #تدافع_مشعر_مني pic.twitter.com/nnaDNUrIO9 — قناة الإخبارية (@alekhbariyatv) September 24, 2015

He ordered an inquiry.

Saudi King Salman bin Abdulaziz Al Saud later ordered a review of the country's plans during Hajj.

"Regardless of the investigation results, the improvement of the methods and mechanisms of the Hajj season will not stop. We have instructed the concerned entities to re-evaluate the current policy and the distribution of responsibilities," he said.

In Thursday's stampede, pilgrims were walking toward the largest of the pillars when there was a sudden surge in the crowd about 9 a.m., causing a large number of people to fall, the Saudi Press Agency said, citing civil defense officials.

Information on what led to the surge wasn't immediately available.

Photos: Hundreds killed in Hajj stampede Hide Caption 1 of 14 Photos: Hundreds killed in Hajj stampede Saudi emergency personnel surround bodies of Hajj pilgrims at the site of a stampede Thursday, September 24, in Mecca, Islam's holiest city. Thursday morning's stampede killed hundreds during one of the last rituals of the Hajj, the annual Islamic pilgrimage Hide Caption 2 of 14 Photos: Hundreds killed in Hajj stampede Saudi emergency personnel carry a body. Hide Caption 3 of 14 Photos: Hundreds killed in Hajj stampede People stand near the bodies of victims at the site of the stampede. Hide Caption 4 of 14 Photos: Hundreds killed in Hajj stampede Bodies lie covered in sheets. The death toll has been climbing steadily. Hide Caption 5 of 14 Photos: Hundreds killed in Hajj stampede People stand near bodies covered in sheets. Hide Caption 6 of 14 Photos: Hundreds killed in Hajj stampede Muslim pilgrims and rescuers gather around the victims. Hide Caption 7 of 14 Photos: Hundreds killed in Hajj stampede Bodies lie in the street as emergency personnel work. Hide Caption 8 of 14 Photos: Hundreds killed in Hajj stampede Saudi emergency personnel load a wounded pilgrim into an ambulance. Hide Caption 9 of 14 Photos: Hundreds killed in Hajj stampede Emergency personnel carry an injured person. Hide Caption 10 of 14 Photos: Hundreds killed in Hajj stampede Saudi ambulances arrive on the scene. Hide Caption 11 of 14 Photos: Hundreds killed in Hajj stampede A man searches for a relative injured in the stampede. Hide Caption 12 of 14 Photos: Hundreds killed in Hajj stampede Saudi medics tend to an injured pilgrim. Hide Caption 13 of 14 Photos: Hundreds killed in Hajj stampede Saudi emergency personnel stand near bodies of Hajj pilgrims. Hide Caption 14 of 14

A risky pilgrimage

The ceremony was the scene of stampedes and hundreds of deaths in the 1980s and 1990s as pilgrims passed a crowded bottleneck area leading to the small pillars on the ground.

In 2006, a stampede there killed at least 363 people.

After that, the Saudi government erected three massive pillars and completed a $1.2 billion, five-story bridge nearby where pilgrims can toss stones. It was meant to be a roomier atmosphere and a more efficient way to accommodate the faithful.

Speaking at St. Patrick's Cathedral in New York, Pope Francis offered words of comfort during evening prayers.

"I have two feelings for my Islamic brothers. First my greeting for being today the day of the sacrifice. I would have liked that my greetings would have been warmer," he said.

"A second feeling is my closeness, my closeness with the tragedy that its people have suffered today in Mecca. In this moment of prayers, I join and we join them."

The ritual

The stoning ritual is done over at least two days. Pilgrims stone the three pillars at Mina -- believed to be where the devil was stoned when he tried to dissuade Abraham from obeying God's orders to slaughter his son. According to tradition, the event was a test from God, who gave Abraham a ram to slaughter instead.

Thursday was the third day of the Hajj.

On September 11, just days before this year's Hajj started, a construction crane crashed through the roof of another Hajj destination, the Grand Mosque in Mecca, killing 107 people. At least 238 others suffered injuries when a powerful storm toppled the crane.

Losing one's life during the Hajj season is considered by many devout Muslims as an entry to heaven.

A spiritual climax

More than 2 million Muslims from around the world are attending the annual Hajj pilgrimage this year.

Photos: The Hajj: Muslims gather for annual pilgrimage Photos: The Hajj: Muslims gather for annual pilgrimage Muslim pilgrims make their way to cast stones at a pillar in the "stoning the devil" ritual Thursday, September 24, in Mina near Mecca, Saudi Arabia. At some point during this last rite of the annual Hajj, a stampede occurred, killing and injuring hundreds . More than 2 million Muslims have been making the pilgrimage to the holy city of Mecca. The Hajj is one of the most celebrated events in the Islamic calendar. Hide Caption 1 of 8 Photos: The Hajj: Muslims gather for annual pilgrimage A pilgrim reads the Quran on a rocky hill called the Mountain of Mercy, on the plain of Arafat, near Mecca on Wednesday, September 23. Hide Caption 2 of 8 Photos: The Hajj: Muslims gather for annual pilgrimage Muslim pilgrims pray at Namira Mosque on September 23 on Mount Arafat near Mecca. Hide Caption 3 of 8 Photos: The Hajj: Muslims gather for annual pilgrimage Pilgrims join in one of the Hajj rituals early September 23 on Mount Arafat. For most Muslims, the pilgrimage is the spiritual climax of their lives, with many saving for decades to be able to make the journey to Mecca. Hide Caption 4 of 8 Photos: The Hajj: Muslims gather for annual pilgrimage Muslim pilgrims pray on the Mountain of Mercy, on the plain of Arafat. Islam requires every Muslim who is physically and financially able to make the journey to Mecca at least once in his or her lifetime. Hide Caption 5 of 8 Photos: The Hajj: Muslims gather for annual pilgrimage Muslim pilgrims pray on the Mountain of Mercy on Tuesday, September 22. Hide Caption 6 of 8 Photos: The Hajj: Muslims gather for annual pilgrimage Muslim pilgrims touch Islam's holiest shrine, the Kaaba , at the Grand Mosque in Mecca on Monday, September 21. Performing the Hajj is one of the five pillars of Islam. Hide Caption 7 of 8 Photos: The Hajj: Muslims gather for annual pilgrimage Muslim pilgrims circle counterclockwise the Kaaba at the Grand Mosque in Mecca on Monday. The pilgrimage, conducted over five days, includes detailed rituals including wearing a special garment that symbolizes human equality and unity before God, a procession around the Kaaba and the symbolic stoning of evil. Hide Caption 8 of 8

Known as the fifth pillar of Islam, the Hajj is an obligation upon every Muslim who has the financial means and the physical ability to perform it. For most, it is the spiritual climax of their lives, with many saving for decades to make the journey.