BANGKOK -- Six baby elephants, trapped in a mud hole and separated from their parents, have been rescued by a team of park rangers in northeastern Thailand.

The rangers came across the elephant calves on Wednesday afternoon as they were struggling to climb the pit's slippery banks, according to officials of Thap Lan National Park.

Some of the rangers went for help, while others spent the night with the baby elephants.

On Thursday, as the elephants wallowed together at one side of the pit, rangers at the other side spent four hours using hoes and pickaxes to dig out enough mud to form a ramp.

Video of the great elephant escape released by the Department of National Parks shows the animals climbing out of the muck and quickly heading into the forest, a few dozen meters (yards) away.

The rangers cheer the elephants on, with comments like "Go, go on, child!"

One elephant struggles, slips and falls, but finally all make it out of the muck.

The last of the animals then lingers, after all the others have made it past the tree line. It faces the rangers for a moment, turns, pauses and finally runs into the jungle.

"Gone, they're gone," cries a ranger, as the rescue crew comes together to celebrate.

Park chief Prawatsart Chantep said there were signs that a herd of elephants believed to be related to the trapped infants was circling the area.

Elephants are the official national animal of Thailand, and for a time graced the country's flag when it was still called Siam.

But they do have their dark side. Development has sharply reduced their natural habitat and shrunk their numbers. They are notorious for raiding farmers' fields for food, especially sugar cane.

Several people are killed each year by angry elephants. Last November, a driver on a road near another park in the northeast struck the hind legs of one when it wandered out of the jungle at dusk. The animal responded by stomping on the car, destroying the engine and killing the driver.