BRIGHAM CITY — A man shot by police while firing an AK-47 outside city hall has pleaded guilty to federal weapons charges.

Matthew Jaramillo, 32, pleaded guilty on Wednesday in U.S. District Court to having the gun in connection with the Feb. 9 robbery of a check cashing business. He will be sentenced Nov. 20, the U.S. Attorney's Office for Utah said.

On Feb. 12, police said Jaramillo was firing the gun outside city hall when he got into a confrontation with officers. When he pointed the gun at an officer, a Box Elder County Sheriff's deputy fired, hitting Jaramillo three times.