An Arlington police officer is in critical condition Tuesday after being shot by a teen suspected of killing a 6-year-old Texas girl whose body was found wrapped in a tarp in a nearby residential street. The teenage suspect was shot in the head by another officer.

Alanna Gallagher's body was found on a residential street about a mile from her family's home in the North Texas community of Saginaw on July 1.

A law enforcement source told NBC DFW that police went to the home of Tyler Holder, 17-year-old neighbor, because DNA evidence linked him to Gallagher's slaying.

The home is in the 600 block of Babbling Brook Drive in Saginaw, a couple of houses away from Gallagher's home.

Holder came to the front door with a gun in his waistband, pulled it out and opened fire at the officers, a law enforcement source said.

Arlington police Detective Charles Lodatto, who was assignment with the FBI task force investigating Gallagher's slaying, was shot in the groin. The bullet divided his femoral artery, doctors said later Tuesday.

Holder was shot in the head and his condition is life-threatening, MedStar EMS confirmed. He was taken to John Peter Smith Hospital in Fort Worth.

Saginaw police spokesman Officer Damon Ing said officers were serving arrest and search warrants on the man they considered the main suspect in Gallagher's slaying.

Holder Arrest Warrant

The arrest warrant issued for Holder outlines the events that lead up to the killing of the 6-year-old and includes graphic details of her death.

Gallagher was found wrapped in a tarp with plastic grocery sacks taped over her head with duct tape. The warrant also states the 6-year-old was sexually assaulted.

NBC DFW has chosen not to reveal further details about the assault because of its graphic nature.

According to the warrant, Holder was seen pacing "up and down the sidewalk" when Gallagher's body was found.

Neighbors in the area told officers that Holder told them the body recovered was Alanna Gallagher before the victim had been identified.

Another neighbor also told officers she had seen a gray tarp in the back yard of Holder's home two to three months ago. At that time, officers didn't see the tarp in the back yard. Officers later determined that the tarp the neighbor spotted in the back yard was similar to the tarp in which Gallagher was wrapped.

Investigators first interviewed Holder on July 1, the day Gallagher was killed. The FBI then interviewed him on July 5 and agreed to provide a DNA sample. On Saturday, Holder's DNA sample matched DNA found on the victim.

The arrest warrant was issued Tuesday.

Neighbors Feel Some Relief

One of Holder's neighbors said authorities warned her hours earlier to expect some type of police activity in the area.

"I asked the detectives if I needed to come get my girls and take them to my grandma's house in Grapevine," said Megan Perez, a next-door neighbor. "They said they couldn't really tell me anything right then but it may be a good idea, so that's when I knew something was going to happen."

Perez's twin daughters regularly played with Gallagher.

Perez said she didn't expect something would happen so soon or that it would end so violently.

"It's scary to think he was so close and it could have been one of my kids," she said.

Danielle Simmons, who lives close to where Gallagher's body was found said she recalls seeing Holder at a candlelight vigil for the slain girl.

"He showed up at her memorial with a 'wanted' shirt on, at the candlelight vigil with a 'wanted' shirt," she said. "How disrespectful is that?"

But residents of Saginaw, which is wrapped in purple ribbons in memory of Gallagher, say they feel some relief that a suspect has been identified.

"Our community can go back to being the way we were," Simmons said. "This is a very family-oriented community."

NBC DFW's Greg Janda, Scott Gordon, Ray Villeda, Keaton Fox and Kevin Cokely contributed to this report.