A 20-year-old Buffalo man was sentenced Wednesday to eight years in prison for robbing a man at gunpoint last November and then minutes later forcing himself sexually on a woman.

Erie County Judge Kenneth F. Case also sentenced Jesse Buchanan, of Woltz Avenue, to 10 years of post-release supervision.

Buchanan last month pleaded guilty to first-degree robbery and first-degree criminal sexual act, according to the Erie County District Attorney’s Office.

Buchanan was linked to the crimes by DNA evidence.

Buchanan admitted robbing the man near East Delavan Avenue and Suffolk Street and then committing the sex crime about a block away.

He had faced a maximum prison sentence of 25 years on each count, according the District Attorney’s Office.