ORANGE COUNTY (CNN) — A 3-year-old boy is recovering after he was attacked by a mountain lion on a Southern California trail.

The incident happened Monday at the Whiting Ranch Wilderness Park in Orange County.

“We have a match. Our forensic scientists in Sacramento just put in a call to us and said they have a match, its the correct lion,” said Capt. Patrick Foy with the California Department of Fish and Wildlife. 

Fish and wildlife officials received DNA test results and confirmed that the mountain lion they killed yesterday at Whiting Ranch Wilderness Park was the one that attacked and injured a 3 1/2 year-old boy who was hiking with his family.

The unidentified boy was with his parents and three siblings when the mountain lion came out of a tree and bit the boys neck.

The boy’s father jumped into action then called 911.

“He shouted and charged at the lion and as he did so, the startled lion let go of the son,” Foy said. 

With the boy now out of the lions grip, the boy’s father distracted the animal with what he could.

“I threw my backpack at it, which startled the mountain lion. It grabbed my backpack and then went up in a tree,” the father said according to 911 dispatch recordings. 

Bystanders took pictures and recorded as the lion ran up a tree with the backpack in his mouth.

It stayed up there before wildlife officials arrived and determined they had to kill the lion for public safety.

“When a lion or bear actually gets to a point where they start attacking and threatening to kill small children, that’s definitely into the black and white area,” Foy said. 

The 3 1/2 year-old little boy was treated and released from the hospital last night and is said to be doing well.

The family released a statement that was read by Warden Nick Molsberry.

“Our little boy is fine. Sadly, the mountain lion had to be killed. We do not fault this magnificent creature for its instinctive behavior. Our family will be back on the trail soon,” Molsberry said. 

Whiting Ranch Park was closed following the attack but will reopen Wednesday.

Department of Fish and Wildlife says 17 people — including the child in this incident — have been attacked by mountain lions in California since 1986.

Three of those attacks were deadly.