Christina Brazier, 17, pleaded guilty to possession of drugs, a crime which carries up to 10 years in jail and a $10,000 (£5,700) fine. District judge Lauri Blake, who sits in Sherman, 65 miles north of Dallas, ruled that to avoid jail Ms Brazier "shall not have sexual intercourse while enrolled in school and living with parents".
"That's a new one. I'm not sure how you would enforce that," Jim Mills, interim director of adult probation for Dallas county, told the Dallas Morning News. The sex ban was one of many prerequisites Ms Brazier had to accept.
She was also ordered not to "wear clothing associated with the drug culture", "obtain any new tattoos or piercings" or "use tobacco products", and to observe a 10pm curfew.
Ms Blake, 40, a Sunday school teacher and former police officer who was elected in November, has also imposed strict rules for lawyers in her courtroom, including no sleeveless shirts or showing any cleavage. In her campaign last year she pledged to challenge the "good ol' boy" system which she claimed ruled the local legal establishment.
She claims no lawyers have criticised her style although one, David Stagner, has filed a complaint after he was taken away in handcuffs and held in a cell because of his bad manners.
"Bailiff, take him into custody and remove him to the holdover," she said, according to a court transcript. "I am not playing games, Mr Stagner. Now when you decide you have good manners, Mr Stagner, you may come back."
"This woman is completely out of control," said Mr Stagner, who is petitioning the Texas supreme court to have her removed. "There is a revolution. Ninety percent of this bar is horrified."
Steve Blackburn, a lawyer involved with the local branch of the American Civil Liberties Union, which lobbies to protect constitutional rights, told Associated Press that defendants who do not like their probation conditions can reject them, and go to jail. He said that probation conditions that violated someone's constitutional rights were best avoided. "The idea is that you can't ever ask somebody to give up certain rights," he said.