A man has been charged with a shooting that killed a man and wounded two other people during a home invasion last week in west suburban Maywood.

James Randle, 33, of Stone Park, is charged with first-degree murder in connection with the killing of 27-year-old Samuel Rosales, Maywood police said Friday. Randle also faces two counts of aggravated battery.

About 10:45 p.m. Jan. 4, two masked gunmen forced their way into a second-floor apartment in the 500 block of West Lake Street, according to Maywood police.

A struggle inside the apartment ensued and several shots were fired, at least one of which fatally struck Samuel Rosales, police and the Cook County Medical Examiner’s Office said. He was taken to Loyola University Medical Center in Maywood, where he was pronounced dead at 11:06 p.m.

Two family members of Rosales were also shot, police said. It wasn’t clear if members of Rosales’ family also returned fire during the struggle. A handgun was found inside the home and a second handgun was found in an alley behind the apartment building.

Randle was found suffering from a gunshot wound to chest nearby in the 300 block of North Sixth Avenue, police said. He was taken to a hospital for treatment and later charged. It wasn’t immediately clear who shot him.

Randle was ordered held without bail in a court hearing Saturday, according to Cook County Sheriff’s Office records. His next court appearance was scheduled for Jan. 24.

Anyone with information was asked to call Maywood detectives at (708) 450-4440.