Police say that a 24-year-old man was mistakenly released from custody after a court appearance in Scarborough earlier this week.

Joshua Hogan was in police custody in connection with charges he was facing in Peterborough.

He was brought to the Eglinton Avenue courthouse to face unrelated charges laid by the Toronto Police Service on Wednesday afternoon, at which point he was released in error.

He has not been seen since around 5:10 p.m. on Wednesday.

Police say that Hogan is wanted for outstanding charges in Peterborough and is also the subject of an arrest warrant issued by Peel Regional Police.

Hogan “may be violent and dangerous,” according to police.

He is described as five-foot-nine, 165 lbs., with shoulder-length brown hair.