CHEYENNE, Wyo. (AP) — Federal prosecutors say a Wyoming man has been sentenced to more than 15 years in prison for attacking a sheriff's deputy and carjacking a woman outside a county courthouse.

U.S. Attorney Mark A. Klaassen's office says Jonathan Alexander Olivares pleaded guilty to carjacking and use of a firearm during a crime of violence. Prosecutors dropped a third weapons charge.

Following his prison sentence, Olivares will be on supervised release for five years.

According to court records, Olivares was held in jail before he was taken to Uinta County's courthouse on June 26 for a hearing.

Authorities say Olivares was being escorted out of the courtroom when he overpowered a sheriff's deputy, took the officer's gun and carjacked a woman outside the courthouse in Evanston. The 26-year-old was arrested shortly afterward.