A Redwood City man convicted of torturing and killing a puppy in front of his 4-year-old daughter was sentenced Friday to two years in county jail, with an additional year in a residential treatment facility, prosecutors said.

The sentence stems from weeks of abuse meted out by Alan Velete, 32, on a 4-month-old terrier puppy named Lucky.

Velete was on probation for assault with a deadly weapon when he and his daughter moved in with his girlfriend at his girlfriend’s mother’s Redwood City home in December.

Velete soon became enraged at the pup after it defecated on the floor.

For the next several weeks, Velete punched and kicked the dog, sprayed household cleaners in its eyes and fed it his psychiatric medication, prosecutors said.

Velete also stuffed the puppy into a duffel bag and hanged it in the shower, where he would listen to the dog whimper and cry, prosecutors said.

Much of the abuse took place in front of his young daughter and girlfriend, who were too scared of Velete to call police. They alerted authorities after he suffocated the dog and hauled its body away in a sack.

Velete pleaded no contest to committing animal cruelty in July and was sentenced to the maximum of three years in jail Friday, which District Attorney Steve Wagstaffe said was a fair sentence.

“For what he did here, sometimes you wish there was a way to give them more time,” Wagstaffe said. “But there is no special charge for torture of an animal and the judge gave him the maximum.”

Velete, who has been in custody since his arrest, was ordered to spend two years in jail, with credit for time served, and an additional year in a psychiatric residential treatment facility.

Chronicle staff writer Vivian Ho contributed to this report.

Kale Williams is a San Francisco Chronicle

staff writer. E-mail: kwilliams@sfchronicle.com Twitter: @sfkale