In a confrontation spawned by a child custody dispute, a St. Mary's County man threatened two sheriff's deputies with a rifle Sunday and later assaulted them before being subdued with a jolt from an electrical stun gun, police said.

Sheriff's officers were dispatched about 10 p.m. Sunday in response to a call to the St. Mary's County Emergency Operations Center by the suspect himself. Timothy Sanders said he was angry at his wife for not allowing him more visitation time with his children, according to a report by the county's Bureau of Criminal Investigations.

Court documents filed in the case say that when Sanders was told the authorities could not resolve the civil issue, he replied that he was "loading his guns up and going to get his children." Sanders is described in the court documents as saying that "if anybody tried to stop him he would shoot them."

When deputies arrived at Sanders's Great Mills home, they found Timothy Sanders sitting in his car, pointing his rifle at them, police said. The deputies set up a perimeter around the house, and Sanders went inside, where he spoke to officers over the phone, according to the court documents.

The officers eventually coaxed him outside unarmed, the investigative report said.

The deputies tried to handcuff him, but Sanders put up a struggle, the report said. Police released a dog to control Sanders but he struck the animal.

An officer then used an electrical stun gun to subdue him.

The St. Mary's Sheriff's Office has nine Taser-brand stun guns and 45 officers certified to use them, said Lt. John Horne. In the year and a half since the weapons were acquired, deputies have drawn them from their holsters 22 times and fired them nine times, Horne said.

Sanders was charged with two counts of first-degree assault, two counts of second-degree assault and one count of resisting arrest. Authorities said two rifles, a handgun and other weapons were found in Sanders's car.