CHICAGO (CBS) — Two men were arrested Sunday night in southwest suburban Joliet, after police said they attacked an officer who was making a welfare check at an apartment building.

James Webb, 39, is charged with three counts of aggravated battery to a peace officer; and one count each of aggravated assault to a peace officer, mob action, resisting a peace officer, and obstructing a peace officer.

READ MORE: Chicago Police Officer Shot, Wounded In Calumet Heights; One Suspect Also Shot

Antonio Tobar, 35, is charged with two counts of aggravated battery to a peace officer, and one count each of mob action and obstructing justice.

Police said officers responded to the Riverwalk Homes in the 300 block of North Broadway Street around 6:45 p.m., to conduct a welfare check after a person who called 911 hung up.

When they arrived, police said an officer came across Webb in the apartment building hallway.

“Webb took an aggressive stance and began walking towards the Officer, ignoring numerous commands from the Officer to stop. Webb then physically assaulted the Officer, who then placed Webb into custody after a brief struggle,” Joliet Police said in a statement.

READ MORE: Massive Fire Destroys Home In Kildeer; Holiday Decorations Believed To Be To Blame

At that point, Tobar attacked the officer from behind, and put him in a headlock, according to police. Webb then started stomping on the officer’s head and spat on him while he was on the ground.

The officer used his Taser on Tobar, but it had no effect, and the officer called for emergency assistance.

A security guard at the apartment building intervened, and additional officers showed up to take Tobar and Webb into custody.

Police said the officer who was attacked was taken to AMITA Health Saint Joseph Medical Center Joliet to be treated for multiple injuries, and his condition was stabilized.

MORE NEWS: Jussie Smollett Trial: Abel Osundairo, One Of Two Brothers Who Said He Was Paid To Help Stage Attack, Says Smollett 'Wanted Me To Fake Beat Him Up'

Both Webb and Tobar were due to appear in Will County Court on Monday.

CBS 2 Chicago Staff