The father of a 2-year-old boy who injured his parents as well as himself with a gun last week was arrested Monday, according to the Sagadahoc County Sheriff’s Office.

Ian Carr, 25, was arrested on a warrant for one count of endangering the welfare of a child — a Class D offense — after he agreed to turn himself in, according to authorities.

Police responded to a home at 109 New Meadows Road in West Bath around 8 a.m. on May 12 after a report of multiple injuries from gunshot wounds.

The boy found an unsecured Glock 9mm semi-automatic pistol and fired it after finding it on a nightstand, police said.

The boy’s mother, Carrie Savoie, 22, suffered a leg injury while Carr suffered an injury to the back of the head from two bullet fragments, police said. Meanwhile, the boy was struck in the face by the recoil of the weapon and suffered facial contusions

All three were initially taken to Mid Coast Hospital in Brunswick and then Maine Medical Center in Portland with non-fatal injuries, police said.

A 3-week-old baby boy was in the room at the time of the shooting and was given to a grandmother who lived at the home, police said. However, she was not at the home at the time the shots were fired.

Carr was released on personal recognizance bail with an arraignment set for Aug. 10 at the West Bath District Court. Bail conditions include no possession of weapons, police said.

Carr is also not allowed to return to the home on New Meadows Road and his children are in the custody of family members. He must adhere to visitation rules set forth by Maine DHHS, police said.