CHEYENNE, Wyo. (AP) — A Wyoming man fainted when he was sentenced to up to two years in prison for using his cellphone to take video up a woman's skirt at a Cheyenne store last June.

District Judge Catherine Rodgers on Thursday rejected a plea agreement that recommended 38-year-old Joshua McCard be given a probationary sentence for voyeurism. She sentenced him to 21 to 24 months in prison, noting his extensive criminal history included twice serving jail time for taking pictures up women's skirts at grocery stores.

McCard's knees gave way and he slowly sank down and fell backward.

McCord also had convictions for sexually assaulting his then-girlfriend's daughter in 2001 and another for domestic battery. Rodgers noted he was unable to meet the conditions of his supervised release in both cases.

More From KGAB