A 9-year-old girl died Sunday after a pit bull attacked her while she played with friends in a Long Island backyard, authorities said.

Nassau County police officers responded to a 911 call at a Holland Avenue house in Elmont at around 10:30 a.m. and found the dog attacking the girl. When one of the officers entered the yard from the house, the dog charged at the officer, who shot and killed the animal, said Detective Michael Bitsko.

The girl had been visiting the home and playing with two other girls and the dog at the time of the attack, Bitsko said. A woman inside the house rushed out and tried to pull the dog off the girl, but failed.

"It was a violent attack," he said. "They had to put the dog down."

The girl's identity hasn't been disclosed by police.

There had been no previous complaints to police about the dog, Bitsko said, adding that he didn't know why the dog attacked the girl.

The dog's owner, Carlyle Arnold, 29, lives in a second-floor apartment of the house. He was arrested on an unrelated charge of violating an order of protection and was being questioned about the attack.