A northern Iowa police officer was shot Wednesday night, prompting a manhunt that ended with an arrest in Minnesota.

The Iowa State Patrol said the officer was shot around 8 p.m. in Algona, a town of about 5,300 residents. The officer’s name and details about the officer’s condition were not immediately released.

The 43-year-old suspect fled, prompting a Blue Alert to let the public know a suspect who posed a potential threat to law enforcement was on the loose.

KCCI-TV reported that the suspect was captured just before midnight and taken into custody in Brown County, Minnesota, according to a news release from the sheriff. Brown County is about 100 miles (161 kilometers) north of Algona. The release said the man was captured without incident.