Six baby elephants trapped in a mud pit have been rescued by rangers at a national park in northeastern Thailand.

The elephants were unable to climb out of the slippery pit, park officials said, prompting a rescue operation to create a pathway for the creatures to escape the trap.

SECOND ELEPHANT IN A WEEK DIES OF HERPESVIRUS AT INDIANAPOLIS ZOO

In this photo released and taken by Department of Natural Park, Wildlife, and Plant Conservation on Thursday, March 28, 2019, Thap Lan National Park rangers prepare to extract six baby elephants stuck in a muddy pond at Thap Lan National Park, Nakhon Ratchasima province, northeastern Thailand. (Department of Natural Park, Wildlife, and Plant Conservation via AP)

Rescuers took five hours on Thursday to dig a path for the elephants to clamber out of the pit. One by one the elephants then climbed out of the muddy ditch.

The animals were trapped at Thap Lan National Park in Nakhon Ratchasima province, with the head of park, Prawatsart Chantep, saying rangers discovered them on Wednesday afternoon.

Park rangers took five hours to dig out a path to save six elephant calves after they were found trapped in a muddy pond. (Department of Natural Park, Wildlife, and Plant Conservation via AP)

MIAMI ELEPHANT DIES AFTER FIGHT WITH ANOTHER 'GOLDEN GIRL' PACHYDERM

He said there were signs that the trapped animals may be related to a herd of elephants that was circling the area,

CLICK HERE TO GET THE FOX NEWS APP

It remains unclear how the elephants ended up trapped in the pit.

In this photo taken and released by the Department of Natural Park, Wildlife, and Plant Conservation Thursday, March 28, 2019, Thap Lan National Park rangers prepare to extract six baby elephants stuck in a muddy pond at Thap Lan National Park, Nakhon Ratchasima province, northeastern Thailand. Park rangers took five hours to dig out a path to save six elephant calves after they were found trapped in a muddy pond. (Department of Natural Park, Wildlife, and Plant Conservation via AP)

The Associated Press contributed to this report.