The metal detector at the Jackson County Detention Center in Kansas City, Mo., beeped repeatedly when Laurie Snell, a lawyer, tried to enter the facility on May 31.

She was passing through security on her way to visit a client, but something she was wearing was setting off the detector. She removed her shoes, her jewelry and her glasses. Then she realized the problem was her bra.

So Ms. Snell ducked into a bathroom, removed the undergarment and put it into a bin for the X-ray machine. That got her through security. Then, in the privacy of an elevator cabin, she wriggled back into the bra as quickly as she could.

“Thankfully my client was on seven, which is the top floor,” she said.

Ms. Snell was among the first to point out that the metal detector at the detention center was reacting to women’s bras. She was not the last. Over the past two months, the issue has spawned a legislative debate, a public protest and a deadlock between a group of lawyers and the county authorities.