Updated

A judge ignored the terms of a plea agreement and sentenced a former FBI agent to jail for shooting at a police officer outside a Michigan fitness club.

Judge Dennis Leiber told 35-year-old Ruben Hernandez of North Las Vegas, Nevada, that anyone who shoots at a law enforcement officer is going to jail. He sentenced Hernandez Thursday to 135 days.

Hernandez pleaded no contest to felonious assault. A no-contest plea isn't an admission of guilt, but is treated as one in sentencing. Prosecutors recommended no jail time.

In court, Hernandez apologized to Grand Rapids police.

No one was injured in the December shooting outside the gym, and police did not return fire. The Las Vegas-based agent was in Michigan for an investigation. The FBI later fired Fernandez.