LIMA, Peru -- Rescuers finished pulling 51 bodies from the wreckage of a bus that tumbled over a cliff in Peru in one of the deadliest vehicle accidents in the nation's history, authorities said Wednesday.

Nearly everyone on board was killed Tuesday after the passenger bus collided with a tractor trailer on a narrow stretch of highway known as the "Devil's Curve," which was subsequently closed to bus traffic by the government.

Firefighters and police worked for more than 24 hours to recover the remains, tying bodies onto stretchers and pulling them up the cliff with ropes. The bus landed on a rocky, isolated beach north of Lima with no road access.

Get Breaking News Delivered to Your Inbox

Six survivors were taken to hospitals, including one man who told doctors he escaped harm by jumping out of a window moments before the bus fell into the abyss.

In this photo provided by the government news agency Andina, firemen recover bodies from a bus that fell off a cliff after it was hit by a tractor-trailer rig, in Pasamayo, Peru, Jan 2, 2018. AP

"The patient is totally stable with just some cuts and a fracture to his arm," Dr. Victor Viru, director of the Chancay Hospital, told a local television station.

The crash's death toll is equal to that of a 2013 accident that is the deadliest in recent Peruvian history. In that crash, 51 Quechua Indians were killed when the makeshift bus they were traveling in fell off a cliff and into a river.

Deadly wrecks with large numbers of victims occur with relative frequency along Peru's roadways, with more than 2,600 people killed in 2016. The crashes often involve buses carrying mostly poor Peruvians traveling outside major cities. Transportation experts blame a combination of bad road conditions and little enforcement of traffic safety regulations.

In this photo provided by the government news agency Andina, rescue workers surround an injured man on a stretcher who was lifted up from the site of a bus crash at the bottom of a cliff, after the bus was hit by a tractor-trailer rig in Pasamayo, Peru, Jan. 2, 2018. AP

President Pedro Pablo Kuczynski announced Wednesday that he was ordering the nation's Ministry of Transportation to begin working on plans to expand a nearby road farther from the cliff, and according to the "Peruano" newspaper and other Latin American media, he banned all buses from traversing the Pasamayo stretch of highway, which has earned the name "Devil's Curve."

The road near the Pacific contains 52 curves in a stretch of just 14 miles bordered by a wall just 20 inches high. It is frequently covered in mist and has been the site of numerous accidents.

In a statement issued through the Roman Catholic Church in Peru, Pope Francis offered his condolences and prayers for "the eternal rest of the victims." The pope is scheduled to visit Peru later this month.