A District man was sentenced to four years in prison earlier this week for an incident in which he pulled a gun when a babysitter showed up at his girlfriend’s home.

According to authorities, a babysitter and a friend went to Damien Anthony’s girlfriend’s Southeast D.C. residence on Feb. 7 to pick up personal property. As the girlfriend, babysitter and friend spoke in the doorway, Anthony came to the door and displayed a .45-caliber handgun.

Police executed a search warrant at the residence on Feb. 15, authorities said, during which Anthony threw a handgun and cocaine from a window.

Anthony pleaded guilty in September to attempted assault, possession with the intent to distribute cocaine, and a gun charge. He was sentenced Tuesday in D.C. Superior Court, authorities said.