A man with a history of domestic violence against his former girlfriend allegedly killed her last summer after she sought protection from him in court.

Marlon Giles, 33, was denied bail Friday during a hearing before Judge Stephanie K. Miller at the Leighton Criminal Court Building. Miller cited Giles’ “extensive violent background” and “penchant for domestic violence” in her decision.

Giles faces a count each of first-degree murder and attempted first-degree murder in the Aug. 10 shooting that killed 28-year-old Monterae Hardin and wounded a 15-year-old boy who was with her at the time, according to officials.

Giles and Hardin had dated on-and-off for 3-4 years, prosecutors said. Giles was convicted of a misdemeanor count of domestic violence against Hardin in June and was sentenced to two years of probation. An order of protection against Giles was also approved that was supposed to last into 2022.

Giles violated the order on multiple occasions by calling or texting Hardin, prosecutors said. On the day of the shooting, Hardin went to Cook County’s Domestic Violence Courthouse to report Giles had violated the protection order again and an arrest warrant was issued for Giles.

Marlon Giles | Cook County sheriff’s office

About 4:50 p.m., Hardin, the 15-year-old boy and multiple witnesses were standing outside the family’s apartment complex in South Shore when Giles pulled up in a dark-colored Nissan, Assistant State’s Attorney Rachel Mabbott said in court.

Giles got out of the vehicle and began shooting at Hardin as he yelled “You want to play games b—-? I bet this is the last time you put a restraining order on me,” according to Mabbott.

Hardin was shot as she and the 15-year-old ran for cover behind her vehicle, Mabbott said. Giles reloaded and walked to where the two were hiding and began firing again. Both victims crawled under the vehicle as Giles walked to the other side, knelt down and fired again under the vehicle.

Giles got in the Nissan and drove away after the shooting, authorities said.

Hardin and the boy were taken to University of Chicago Medical Center, where she died that evening, police and the Cook County medical examiner’s office said. Hardin had been shot multiple times and the boy suffered gunshot wounds to his face and chest.

Mabbott said the boy underwent multiple surgeries and lost an eye.

Giles was taken into custody on a warrant Oct. 9 in Atlanta, according to court records. A Chicago police arrest report showed he was returned to the city Thursday.

Giles has an extensive criminal background, prosecutors said, including a previous conviction for armed robbery and vehicular hijacking in which he was sentenced to nine years in prison.

Last May, the Chicago Sun-Times reported on the hurdles victims of domestic violence can face when filing orders of protection against their abusers.

The month before, 31-year-old Shaquita Bennett was shot to death in the hallway of her apartment building in the same neighborhood. Prosecutors charged her former boyfriend, Deshawn Johnson, with her murder. He has pleaded not guilty.

Bennett sought two orders of protection against Johnson before her death and filed 10 police reports accusing him of harassment and domestic violence, records showed.

RELATED: Murder case shows system’s hurdles for victims of domestic violence