Two mountain lions were killed in Colorado after an 8-year-old boy was attacked outside his home in Bailey on Wednesday night, Colorado Parks & Wildlife said Thursday.

Further tests will be conducted to confirm that one of the euthanized animals was involved in the attack that occurred around 7:30 p.m. Wednesday, the department said.

The mountain lions were killed after a landowner in the vicinity of the attack reported that a goat was missing and that he had seen two mountain lions in the area, according to the department.

The 8-year-old suffered serious injuries and spent the night in a hospital, and an official with the department said the boy's father likely saved his life by scaring away the animal away after the attack.

"The father had saved his son’s life by running out to it. When he ran out, the mountain lion was on top of his son ... the father was able to run out and scare that mountain lion off as he ran toward it," Jason Clay, spokesman for the Colorado Parks & Wildlife's northeast division, told reporters Thursday, according to video posted to NBC affiliate KUSA's website.

Clay said that the child is in serious but stable condition. The family was not identified and asked for privacy, he said.

(3/4) The mountain lions were then euthanized. We believe that one of these two lions is from the attack Wednesday night. We say that because of the proximity and that they fit the description of the lion reported to us from the attack. — CPW NE Region (@CPW_NE) August 22, 2019

The boy was attacked while he and his brother played on a trampoline outside their home in the Burland Ranchettes Subdivision of Bailey.

The 8-year-old heard a friend calling from a neighboring home and was running over when he was attacked, Colorado Parks & Wildlife said in a statement. The mountain lion bit the boy on the head, the department said in a statement.

The boy’s brother ran inside their home and reported something didn’t sound right, wildlife officials said. Their father ran outside and saw the animal on top of his son, and the mountain lion let go and ran off when the dad approached, the CPW said.

"The kid was running and it probably triggered the lion's natural response to a prey animal running,” Area Wildlife Manager Mark Lamb said in a statement.

Clay said that mountain lions can try and surprise prey as they run by. He said that the attack happened in "wildlife country," with mountain lions, bears and other animals. Before the two mountain lions were euthanized, he said the animal involved in the attack was described as being smaller in size.

Clay said that in general, mountain lion attacks on people are very rare. Since 1990 there have been 22 attacks on people in Colorado, and three of those — in 1991, 1997 and 1999 — were fatal, the CPW said.

There have been three attacks so far in 2019, but before year, the last time a mountain lion attacked a person was in 2016, according to the department. The last time three attacks occurred in a single year was in 1998.

In February, a mountain lion later described as a young cub attacked a runner at Horsetooth Mountain Open Space west of Fort Collins, which is around 85 miles north of Bailey. The runner killed the animal in the struggle.

Wildlife officials said that male mountain lion was between 4 and 5 months old and likely weighed between 35 and 40 pounds at the time of the Feb. 4 attack.

Population estimates of mountain lions in Colorado range from 3,000 to 7,000 mountain lions, according to the Colorado Parks & Wildlife website.

The parks and wildlife department said that it believes one of the two mountain lions that were killed was involved in Wednesday evening’s attack because they fit the description and because of the proximity to the scene.

A necropsy, or an autopsy conducted on animals, will be conducted before being sent to a forensic lab in Wyoming for DNA analysis.

"That is how we would be able to confirm with absolute certainty that we got the mountain lion from the attack," the CPW said in a statement on Twitter Thursday afternoon.

Colorado Parks & Wildlife policy is that any animal that officials are confident was involved in an injury to humans must be put down, Clay said.

Bailey is a community around 40 miles southwest of downtown Denver.