On Monday, a judge in Hendersonville, North Carolina, demanded that a mother stop nursing her child in his courtroom. Yet he had absolutely no legal right to ban her from breastfeeding.

Stephanie Rhodus came to court the morning of April 11 with her 8-month-old baby, Archer, in tow, prepared to plead her case to Judge Peter Knight regarding the custody of one of her older children. Rhodus said to me that she began nursing her son upon arrival, as she thought it would be awhile before her case was called. She also noted that she believed her baby was teething; breastfeeding can be especially soothing to infants during that developmental stage.

When her case was called first, Rhodus and her baby went before Judge Knight and she began to speak. At first, the judge did not comment on her nursing, but 5½ minutes into the proceedings, it became clear that Knight felt like he’d seen enough.

In official audio obtained by several local media outlets and an ABC affiliate, Judge Knight makes demands of Rhodus that run explicitly counter to the legal protections offered to nursing mothers in the state of North Carolina. In the recording, Judge Knight can be heard saying:

“Ma’am you need to cover up. That’s… for you not to realize that is absolutely ridiculous. Step outside and cover up right now. Stand up and go.”

Rhodus didn’t know what to do. “I was shocked,” she told The Daily Beast.

Already flustered and trying to resolve a bitter custody battle so that she might be able to see her son on his pending birthday, Rhodus said that she worked to cover her baby as he ate, while she continued to speak with the judge. Her baby, like many, did not like being covered up while eating, which only made the situation more tense.

“I didn’t know what to do, or how to react,” Rhodus said via phone, her voice wavering slightly at the recall. “And so I just, I um, I stopped breastfeeding. And my baby was fussy the rest of time I was in there.” Rhodus also pointed out that Judge Knight was not upset about the presence of a fussy baby in the courtroom; rather, it was merely the act of feeding the baby that apparently had him riled.

“He pretty much forced me into a position to neglect my child’s needs,” she said.

She added that she was so shocked by his demands that she felt unable to collect her thoughts enough to properly argue her case. Ultimately, the judge ruled against her and she will be unable to see her son for six months.

When reached for comment, Judge Peter Knight gave the following statement:

“We as a court routinely accommodate women who are nursing, including while they are waiting for a case to be called in the courtroom. However, when a case is called and a party is participating in a formal hearing before the court, all litigants are expected to respect the same rules of procedure, decorum and dress. That was the case here. If breastfeeding accommodations were needed, those certainly would have been made.”

Regardless of how the judge—or anyone else—feels about breastfeeding in public, a mother nursing her child is protected by law.

The National Conference of State Legislatures (NCSL) has a summary of all state breastfeeding laws, a resource that all nursing mothers and perhaps Judge Peter Knight should spend an evening reviewing. Forty-nine states, the District of Columbia, and the Virgin Islands all have laws that specifically allow women to breastfeed, be it in the privacy of their own home or in public. Idaho is the only state in the country without these provisions.

Specifically, North Carolina law states that “…a woman may breastfeed in any public or private location where she is otherwise authorized to be, irrespective of whether the nipple of the mother’s breast is uncovered during or incidental to the breastfeeding.”

La Leche League, an international nonprofit in support of breastfeeding mothers, applauded Rhodus, while sharply decrying the actions of the judge. “When Judge Knight in Henderson County, NC, shamed Stephanie Rhodus for breastfeeding and ordered her to leave the courtroom, he directly implied that breastfeeding in public was inappropriate, improper, and disgraceful. However, vast amounts of research have shown that, whether in public or private, breastfeeding is the normal and healthy way to care for a baby’s nutritional and emotional needs,” said Diana West, director of the League’s media relations, in an email. “It is also a legally protected right in North Carolina.”

Still, the laws protecting breastfeeding mothers are only useful if women understand their rights and are empowered to stand their ground when challenged by ignorance.