DENVER | A mountain lion bit and injured an 8-year-old boy on the head outside his rural Colorado home in the third big-cat attack on people in the state this year, prompting authorities to euthanize two lions that were found roaming the area, officials said Thursday.

The boy had been playing on a trampoline with his brother at their home in Bailey on Wednesday evening when a friend called out to him from a house next door. When the boy ran to see his friend, the mountain lion pounced and bit him, according to Colorado Parks and Wildlife investigators.

The boy’s brother ran inside the home and told his father, who rushed outside and found the cat on top of his son. The mountain lion let go and took off running as the father approached.

“It’s quite heroic. He did everything that we would ask somebody to do,” Rebecca Ferrell, a spokeswoman for the wildlife agency, said about the boy’s father. “He ran towards it. He was making himself large and loud. … His efforts almost certainly saved his son’s life.”

The boy, whose name has not been released, was hospitalized in serious but stable condition Thursday.

Colorado Parks and Wildlife tweeted Thursday that a landowner within a mile  of the site of the attack reported a goat was missing and two mountain lions were roaming the area.

Both lions were destroyed and will be sent to a lab in Wyoming for DNA testing.

Wildlife officials say they believe one of the big cats was involved in the attack because of proximity and because both matched the description given by the boy’s father.

Ferrell said the children’s high-pitched voices probably sounded like prey to the mountain lion, and its instinct to attack could have been triggered when the boy started running to his neighbor’s house.

The encounter came after a mountain lion attacked a man scouting places to hunt elk in Big Horn Park northwest of Denver last week. He fought it off with a pocket knife, and officials tracked it with hounds, killing it.

In February, a mountain lion attacked a runner on a trail in the mountains west of the city of Fort Collins. The runner used his foot to suffocate the young cat when it didn’t release its grip after the man hit it on the head with a rock and tried to stab it with twigs.

Ferrell said mountain lions rarely attack people, but Colorado’s booming population is leading to an increase in encounters with dangerous animals.

“When you think about it in that context — that we have more and more people coming in and more and more people moving to those exurban areas where wildlife is quite abundant — the opportunity for human-wildlife interactions will just increase by sheer numbers alone,” she said.

She added that Bailey, nestled in the mountains about 35 miles (56 kilometers) southwest of Denver, is “prime mountain lion habitat.”

There have been 22 mountain lion attacks on people in Colorado since 1990, and three people have died.