A man accused of going on a shooting spree Saturday that wounded two people, including a Chicago police officer, wanted to "lure" officers to the area "because he wanted them to kill him," prosecutors said Sunday.

Tracey Thomas Jr. was charged with the attempted murder of five officers, including the officer who was shot, Fox 32 reports.

Prosecutors said Saturday’s rampage started about 11:30 a.m., when Thomas, 29, approached a person riding a Divvy bike and opened fire.

While chasing Thomas, one of the officers was shot in her hand as he positioned himself in a first-floor window, prosecutors said.

Thomas then holed himself up in a building until 2:20 p.m., when he surrendered, prosecutors said.