A man's dog barked a warning as they walked in the jungle so he climbed a tree for safety - only to find a black panther sharing his hideout, local media reported today.

Malek Saina, 30, told The Star newspaper from his hospital bed that he was searching for wild vegetables near his village in central Pahang state when his dog began making a commotion.

"I decided to climb up a tree for safety but saw a black panther staring at me from one of the branches above. I immediately jumped down as the panther was about to pounce on me," he said.

"As we fell to the ground I tried to stab it with my knife but only managed to scratch it."

Malek said he tried but failed to reach his spear, which he had left on the ground, and the panther sank its teeth into his thigh.

His screams were heard by a friend who was also in the area.

"My friend grabbed the spear from the ground and stabbed the animal twice. He had no choice but to kill the panther - everything happened so fast," said Malek, who was pictured with a heavily-bandaged thigh.