A critically endangered Javan leopard photographed on October 24, 2012 by a camera trap installed in the forest of Mount Halimun-Salak National Park located in Indonesia's western Java island

Four Javan leopards have been spotted in an Indonesian national park where they were previously thought to have died out, raising hopes for the future of the rare big cat.

The were filmed in Cikepuh wildlife sanctuary on Java island by hidden cameras installed after reports the creatures' dung and footprints had been spotted in the area, the environment ministry said Thursday.

Several sets of cameras scanned the area for 28 days in July and August, and filmed three leopards with yellow fur and black spots, and one that was entirely black.

Another eight leopards were believed to be roaming the sanctuary, the ministry said, basing their estimate on studies of the animals' footprints and scratches found on trees.

"The return of this species indicates that the sanctuary has been successfully restored," said environment ministry spokesman Djati Witjaksono Hadi.

The Javan leopard was previously believed to have died out in Cikepuh in the early 2000s due to rampant illegal logging that has devastated the area's forests, the big cat's natural habitat.

Environmental group Conservation International estimated in 2015 there were only around 500 Javan leopards left in the wild, most in forests in western Java.

Leopards are the smallest members of the big cat family, and can grow to around six feet (1.8 metres) in length. Different leopard subspecies are found across the world, from Africa to India and Russia.