A federal judge has sentenced a Janesville man to two years in prison and three years of supervision on a gun possession charge.

Deshawn Foreman, 24, was sentenced June 19 for a July 24, 2019, incident in which he dropped a .45-caliber magazine during a foot chase with Janesville police, according to a news release from the U.S. attorney for the Western District of Wisconsin. At the time, Foreman was on supervision for a burglary charge.

The next day, police reported that Foreman drove toward the town of Beloit, where he left his car and tried to hide from police in a wooded residential area, according to the release. Police said he pointed a .45-caliber pistol at them.

Federal Judge William M. Conley said the offense was serious because of the danger posed to the arresting officers, the release states. He also considered that prior attempts at supervision and rehabilitation had not changed Foreman’s behaviors.