A suburban Chicago police officer has been disciplined after he was recorded on video telling a teenager he was being detained because he’s white.

Footage of the incident was posted to social media Monday, garnering more than 26,000 views in less than 24 hours.

Dezi Baczek, who recorded the video, said she was with friends at a Lake Villa pawn shop where they had gone to sell an item so her little brother could buy a book he had been wanting. When the group exited the shop, they said a detective came up to them.

“I was yelled at to sit down,” Baczek told NBC 5. “I said, ‘What’s the reason?’ And he said sit down or I could turn around and be arrested, so I sat down at that point.”

That's when she said she started recording.

Police said the detective was conducting a theft investigation at the time and was questioning someone in the group. While the remaining members of the group sat on the curb, one teen can be heard in the video recording asking why he’s being detained.

“Because I’m a teen? Because I have baggy pants?” the person says in the footage.

That’s when the officer responds with “Because you’re white,” and walks away.

“I was speechless,” Baczek said. “Like I wasn’t comprehending what he actually said for a minute.”

Baczek’s mother said she called the police chief to complain about the detective involved.

“I was outraged. I was very upset,” Missy Maczek said. “I felt like we were being outcasted because we’re white, which is just unheard of.”

Lake Villa Police Chief Craig Somerville said Detective Esteban Gomez reported the group of teens was accompanying the suspect of a theft investigation at the pawn shop and one of the group members gave the officer a false name. That person was charged with obstructing police.

“When the subject questioned Gomez about his arrest, Gomez reacted by answering the teens [sic] inquiry with an inappropriate response,” Somerville said in a statement.

Somerville added that Gomez told him about the incident and it being captured on video soon after it happened.

"Det. Gomez admitted his words were poorly chosen and insensitive and he immediately regretted what he had said,” Somerville said in a statement. “The Lake Villa Police Department does not condone this type of behavior of its officers."

Gomez was disciplined “for behavior unbecoming an officer” and will be speaking to the parents and teens involved, Somerville said. The details on his discipline weren't immediately released.

"I apologize to anyone who may have been offended by what is depicted on this video," Somerville's statement read. "This occurred on my watch and I assume full responsibility."

