A Cobb County man was sentenced to life in prison for a brutal, 12-hour assault and rape of a woman in his home, the District Attorney said Thursday.

David Martin, 55, of Marietta, was convicted of all charges against him, including rape, aggravated sodomy, false imprisonment, aggravated assault and possession of a firearm during commission of a felony, DA Vic Reynolds’ office said.

On Oct. 15, 2013, the victim went to Martin’s Timberly Drive home to visit, but he refused to let her leave after an argument, according to investigators. For the next 12 hours, Martin dragged the victim by the hair, bound her wrists and ankles with zip ties, tied a rope around her neck, threatened her with a handgun and forced her to have sex with him.

Martin also shaved the woman’s head, and he put her cut hair in a bag and gave it to her as a souvenir when he let her leave, according to prosecutors.

The woman fled “with her head shaved, her dignity taken from her, her body violated in the worst way,” ADA Chuck Boring told the court. “She had been tied up like an animal — and treated worse.”

Three days later, Martin was arrested and booked into the Cobb County jail, where he remained until his trial. He wrote to the woman from jail to ask for forgiveness, the DA’s office said.

Superior Court Judge Reuben M. Green called it one of the worst rape cases he had heard before sentencing Martin.

“Over the course of those 12 hours, you tortured another human being,” Green said. “I hear a lot of ugly things and I cannot think of much worse.”

Martin was sentenced to life in prison, plus five years on the firearms charge.