MADISON, Wis. — A Wisconsin appeals court has rejected a sex offender's arguments that a judge improperly called his offenses as an abomination in the sight of God.

Prosecutors accused Robert J. Betters of having repeated sexual contact with his girlfriend's two teenage sons. Brown County Circuit Judge Donald R. Zuidmulder sentenced him in June 2011 to 25 years in prison and 15 years on extended supervision, remarking every child is a gift from God and his conduct was an abomination in the sight of God.

Betters argued the judge wrongly relied on religious considerations when he handed down the sentence. The 3rd District Court of Appeals ruled Tuesday the judge's remarks were ill-advised but he still properly considered the seriousness and nature of the offense.

Betters' attorney had no immediate comment.