A police officer shot at but missed a man who was holding a rifle during a police standoff in Mount Ephraim Tuesday, according to the authorities.

Matthew Barba, 29, of Mount Ephraim, who was accused of making threats to his girlfriend, surrendered to police after 40 minutes, the Camden County Prosecutor's Office said in a statement Wednesday.

Police responded to the home on the 100 block of Cleveland Avenue around 12:30 p.m. because the father of a woman who lived there reported she was "involved in a physical altercation" with her boyfriend, the release said.

The woman told her father that Barba had weapons and had threatened to shoot her, the office said. Her 4-year-old son was also in the home at the time.

Mount Ephraim and Brooklawn police got the woman and boy out of the home and began communicating with Barba, who was outside, the release said.

They realized he was holding a rifle, and when he pointed it at police, a Brooklawn officer shot at him but missed, the release said. Barba ran back into the residence and refused to come out until he surrendered around 1:10 p.m.

He was charged with three counts of assault for pointing the gun at civilians and police, as well as charges of endangering the welfare of a child and weapons charges.

He was taken to Our Lady of Lourdes Hospital for an evaluation and is now being held in the Camden County Correctional Facility pending his first appearance in court.

Per guidelines from the Attorney General's Office, the officer who fired the shot has been placed on administrative leave while the prosecutor's office conducts an investigation. The prosecutor's office is not releasing the officer's name.

Rebecca Everett may be reached at reverett@njadvancemedia.com. Follow her on Twitter @rebeccajeverett. Find NJ.com on Facebook.

Have a tip? Tell us. nj.com/tips