BELLPORT, NY —A 7-year-old girl and a man were attacked by a pit bull in a Bellport home on Wednesday night, a police spokesperson said.

The girl was playing with the pit bull inside a Bieslin Road home around 5 p.m. when it bit her right arm, officials said. It bit the girl’s mother when she tried to get the dog off of her daughter.

A man in the home, who was dog sitting the pit bull, hit the dog over the head with a shovel to try to get the pit bull off of the girl, a Suffolk County Police Department spokesperson said. It bit him, then ran into the backyard. The man locked the door to keep the dog outside.

The Town of Brookhaven Dog Warden took the pit bill.

Emergency medical services rushed the girl to the hospital in a helicopter, police officials said. She was in serious condition. Her mother and the man suffered non-life-threatening injuries.

Additional identifying information was not immediately available for the girl, her mother or the man.