For years, Texas education officials illegally led schools across the state to deny therapy, tutoring and counseling to tens of thousands of children with disabilities, the federal government said Thursday. In a letter to the Texas Education Agency, which oversees education in the state, regulators from the federal Department of Education said the state agency’s decision to set a “target” for the maximum percentage of students who should receive special education services had violated federal laws requiring schools to serve all students with disabilities. The target, enacted in 2004 and eliminated last year, was set at 8.5 percent of enrollment, and school districts were penalized for exceeding that benchmark, even though the state and national averages had both long been about 12 percent. As a direct result of the policy, regulators determined, the share of students receiving special education services in Texas dropped from 11.6 percent in 2004 to 8.6 percent in 2016 — a difference of about 150,000 children. In the letter, federal regulators ordered the state to design a plan to identify students who were inappropriately kept out of special education and to figure out how to help them, among other corrective actions.