A man who allegedly barricaded himself inside the Commerce Casino while armed with a knife early Tuesday was taken into custody.

The man got into some kind of argument with the security guard in a gaming area inside the casino, located at 6131 Telegraph Road, according to the Los Angeles County Sheriff’s Department. He was described as being mentally distraught.

The man then allegedly brandished a 6-inch knife.

The casino was evacuated and responding deputies tried to detain the suspect at gunpoint.

They used a beanbag round to try to get him into custody, but he did not comply and he barricaded himself inside, authorities said.

Aerial video from Sky5 showed several sheriff’s and Los Angeles County Fire Department vehicles at the scene.

The unidentified man eventually surrendered, authorities said.

Around 8 a.m., he was rolled out in a stretcher and was taken to a hospital for a physical and mental evaluation, officials said.