Arkansas has become the first US state to outlaw gender confirming treatments and surgery for transgender people under the age of 18.
The bill also in effect bans doctors from providing puberty blockers, or from referring them to other providers for the treatment.
The Republican state governor had vetoed the bill, calling it a "vast government overreach".
But the state's Republican-controlled House and Senate overruled him.
The bill has faced much opposition from groups including the American Academy of Pediatrics, which said the law would block trans youth from important medical care and increase their already high risk of suicide.
The American Civil Liberties Union (ACLU) said it was preparing litigation, stating that the bill "will drive families, doctors and businesses out of the state and send a terrible and heart-breaking message to the transgender young people who are watching in fear".
"This is a sad day for Arkansas, but this fight is not over - and we're in it for the long haul," Holly Dickson, executive director of ACLU in Arkansas, said in a statement.
Governor Asa Hutchinson had called the bill "a product of the cultural war in America". He argued it created "new standards of legislative interference with physicians and parents as they deal with some of the most complex and sensitive matters involving young people".
The override of Governor Hutchinson's veto needed only a simple majority, but passed easily in both chambers, with the House voting 72-25 in favour and the Senate 25-8.
At least 16 other states are considering similar legislation.
Supporters of the bill, who are almost all Republican, say they want to protect children from life-changing procedures they will later regret. They also point to side-effects of puberty blockers and cross-sex hormones, and cite occasional cases where transgender people reverse their decision to transition.
But experts say each step is undertaken with the consultation of doctors, therapists and social workers, often over extended periods of time.