A York City man pleaded guilty to a felony assault charge for shooting his daughter's mother's boyfriend during an altercation last summer, saying he only meant to scare off a crowd he thought was gathering around him.

Nile Deshields, 32, admitted to shooting 26-year-old Eric Samuel, also of York, in the hip after the two started fighting the evening of July 21. Samuel recovered, and Deshields turned himself in to face charges of aggravated assault and reckless endangerment.

Deshields told York County Common Pleas Judge Craig T. Trebilcock he drove his daughter to her aunt's house in the 600 block of South Pershing Avenue and saw a group of people on her porch.

One of them was Samuel, who had started dating Deshields' daughter's mother, Deshields' ex. Deshields told the judge he had already been "feeling some kind of way" about Samuel because he didn't like the idea of another man being around his young daughter.

The defendant said he confronted Samuel because he had heard Samuel was mistreating his daughter.

The confrontation turned physical altercation between the two men, but Deshields said it wasn't until he felt a third person touch his back that he drew the gun he was carrying.

He was concerned the group of people on the porch was approaching him, so he fired the gun to scare them off, he said. Deshields said he didn't mean to shoot Samuel; he was just firing a warning shot, but it hit Samuel.

The shot was not life-threatening. Deshields turned himself him in later that night.

He was charged with aggravated assault and recklessly endangering another person, but the state dropped the endangerment charge after Deshields pleaded guilty to the assault.

Trebilcock reminded Deshields the plea was open, meaning he didn't have a plea deal with the District Attorney's Office and it would be the judge's discretion to determine sentencing. The maximum sentence is as much as 10 years in jail and a $25,000 fine, the judge said.

Deshields will be sentenced before Trebilcock at 9 a.m. March 21.