A six-year-old boy is recovering in hospital after being attacked by a mountain lion in California yesterday.

The mountain lion, also known as a cougar, attacked the boy at around 1pm on a hiking trail near Cupertino, attempting to drag the child away before it was fought off by the boy’s father and another man, said Lieutenant Paul Foy of the California Department of Fish and Wildlife.

The boy, who suffered bite wounds and scratches on his head and neck, was walking slightly ahead of a group of 10, including his parents and other families, when the cougar “came out of nowhere” and attacked him.

“It’s quite extraordinary the lion would attack a person with so many people in the immediate vicinity,” Lt. Foy said.

It is believed the big cat attacked the child in much the same it would a group of deer – by choosing and targeting the weakest member of the group.

Lt. Foy said: “He was very, very lucky that the parents were so close,” commenting it was their actions – shouting and running towards the lion – that may have scared the animal off.

Today the boy was recovering at Santa Clara Valley Medical Center, where he was listed in fair condition, hospital spokeswoman Joy Alexiou said.

A federal trapper is en route to ensure the mountain lion does not pose a threat to other humans.

Authorities have closed hiking trails in the area, asking the public to avoid walking within their established perimeter.

Santa Clara County Sheriff’s office tweeted that deputies, alongside individuals from the California Department of Fish and Wildlife, were searching for the animal.

There have been 13 verified mountain lion attacks in California between 1989 and 2013. Three were fatal, according to the Fish and Wildlife department.

The attack is highly unusual as mountain lions, an endangered species, usually hunt at night or in the early hours between dawn and dusk.

They generally prey on deer, although they also eat racoons, coyotes and porcupines. Although shy and solitary animals, they have been known to attack lone adults or children.