SAN DIEGO -- Wildlife officers said Tuesday that they killed a mountain lion in a San Diego County nature preserve and will try to determine if it was the animal that injured a 4-year-old boy during a group hike a few hours earlier.

The boy was hospitalized following the attack Monday and treated for head injuries that were not life-threatening, California Department of Fish and Wildlife Lt. Scott Bringman said at a press conference.

The boy was part of a group of six adults and five children in Los Penasquitos Canyon Preserve, a 3,700-acre strip of nature meandering through neighborhoods about 20 miles (32 kilometers) north of downtown San Diego.

The boy was in the middle of the group, which scattered at the time of the attack, Bringman said.

"The father, who should be commended, he threw rocks and the animal left the scene," Bringman said.

San Diego Fire-Rescue reported the attack to Fish and Wildlife, whose officers found mountain lion tracks.

"While they were at the scene, the mountain lion came to the location about 7 o'clock at night," Bringman said. "The animal did not appear to be scared of the wardens, which is an indication the animal is habituated, so at that point in time, the animal was euthanized."

The mountain lion, described as an 80-pound (36-kilogram) adult female, will be tested for DNA from the victim. The boy's clothing and bandages will be tested for DNA from the lion.

"Hopefully, we do have the animal which did attack the kid," Bringman said.

The preserve will be closed until results of the tests are completed, likely within a few days.

Bringman said it's been more than 20 years since a mountain lion attacked a person in San Diego County.

"It's extremely rare," he said, noting that the animals are present but rarely seen.

The boy was extremely lucky because an 80-pound lion can do major damage, Bringman said.

"Luckily the dad was there and fended off the animal," he said.

Children have previously been attacked by Southern California mountain lions. Two well-known incidents occurred in 1986 at Ronald W. Caspers Regional Park in Orange County.

A 5-year-old girl, Laura Small, was mauled that March and a 6-year-old boy, Justin Mellon, was grabbed by a lion the following October. He was rescued by his father, who used a hunting knife to drive the animal away.

Urban sprawl has increasingly encroached in areas where Southern California mountain lions live. Still, they are rarely seen by people.

The lions move constantly and each has a large home range. With some regularity, they are killed by traffic as they try to cross freeways. They also face such threats as rodent poisons and inbreeding due to being hemmed in by development.