Updated

Three weeks after a 6-year-old North Texas girl's body was found in a trash bag wrapped in a tarp hours after she had been playing outside, authorities went to her teenage neighbor's house looking to arrest him.

Instead, the 17-year-old suspect was shot after authorities say he opened fire, seriously wounding a police detective.

The attempted arrest was the culmination of weeks of investigation and turmoil in the suburban Fort Worth neighborhood where Alanna Gallagher had lived, and it followed the discovery last week that someone had set fire to a makeshift memorial to the girl and torched a car owned by her family.

Authorities suspect that Tyler Holder sexually assaulted and suffocated his young neighbor, who was found with plastic bags taped around her neck, according to the capital murder arrest warrant affidavit. Holder's DNA matched evidence found on the girl's body and on a belt wrapped around the tarp, according to the affidavit.

Holder was hospitalized at John Peter Smith Hospital in Fort Worth, which refused to disclose his condition. A hospital spokeswoman, Diana Carroll, said Holder is a "no information patient." The authorities also didn't release his condition. Matt Zavadsky, a spokesman with Fort Worth's MedStar Emergency Medical Services, indicated Holder had been shot in the head.

An Arlington police detective, Charles Lodatto, was expected to recover. Dr. William Witham of Texas Health Harris Methodist Hospital in Fort Worth said officers and emergency personnel saved his life by stopping the bleeding at the scene after Lodatto, who was Arlington's 2012 detective of the year, was shot in the groin and the bullet severed his femoral artery.

Lodatto was part of a multi-agency major crimes task force that went to Holder's home Tuesday morning in the Fort Worth suburb of Saginaw to serve the arrest and search warrants.

Kimberly Holder lives at the home with her son but was not there Tuesday morning, police said. She referred calls to her attorneys. One of them, Lance T. Evans, said in an email to the Fort Worth Star-Telegram that she was in shock and was worried about her son's condition. Evans declined further comment.

Holder lives two doors down from the house where Alanna lived with her family in a middle-class neighborhood of neat, one-story houses. A neighbor told authorities the girl was last seen by Holder's flower beds, according to the affidavit.

Alanna had been missing for about five hours when her body was discovered by two teenagers on a street about a mile from her house. She had been stuffed in a large trash bag and then wrapped in a silver tarp.

Holder told police that on the day the girl went missing, he had slept until the afternoon, watched television and then looked for a job, but his car had not moved, according to the affidavit. A neighbor reported having seen a silver tarp in Holder's backyard a few months before the girl's death, but police did not find it when they were questioning him, the document says.

The affidavit also says Holder told neighbors that the child found dead July 1 was Alanna before authorities had revealed the victim's identity.

All over the Saginaw neighborhood, purple ribbons and bows — placed in memory of the girl whose favorite color was purple — remain on mailboxes, trees, stop signs and light poles.

As far as the girl's memorial and her family's car, police have not yet determined who set those fires. The damage was discovered early Friday.

Neighbors, who described Holder as a nuisance, said he was often seen walking around at various hours during the day and night.

Lisa Arnold said that when Holder was in the fifth grade, he asked her children if they had ever dropped acid. A teacher had already said the young Holder was "bad news," and when Arnold told him to stay away from her children, he walked in front of their house carrying a metal pipe, she said.

Yolanda Sierra said that Holder was wearing a T-shirt that read "Wanted" at a memorial service for Alanna.

"It's inappropriate because ... she was murdered," Sierra said.