Imagine being a teacher and told not to bother trying to help a child who is having difficulty learning. That was happening routinely in Texas public schools before the legislature was shamed into eliminating an 8.5 percent cap the state had placed on special education enrollment.

The federal Department of Education in January told the Texas Education Agency that the “target” it first imposed in 2004 violated federal laws requiring schools to serve all students. The cap wasn’t just illegal, it was morally reprehensible and shortsighted.

The cap limited the aspirations of students with learning disabilities who didn’t get the help they needed, and shortchanged the state’s future by inadequately educating thousands of its children.

The cap’s impact was reported last year in the Chronicle’s investigative series “Denied,” which pointed out that Houston had imposed an even more draconian 8 percent target for special education enrollment. “It became a nightmare,” said Attucks Middle School teacher Thomas Iocca.

It’s a nightmare that won’t end any time soon for students who lost precious years of federally mandated assistance and interventions that could have helped them learn.

Meanwhile, lawmakers are left with a fiscal headache as they try to find an additional $3.2 billion to spend on special education over the next three years to serve students previously denied assistance. Removing the cap is expected to add 189,000 special education students to public school rolls statewide.

Maybe the state should tap the nearly $11 billion Rainy Day Fund it’s been sitting on. Other issues need more cash too, including unpaid bills from Hurricane Harvey, Medicaid and an underfunded employee pension fund. But special education must be a top priority.

Legislators should be mindful of criticism by local school districts that the state’s overall special education allocation is inadequate. Guy Sconzo, executive director of the Coalition for Fast-Growth School Districts, said more money is needed to hire special ed teachers, speech pathologists, occupational therapists and physical therapists.

The Chronicle investigation showed Houston schools reduced their special ed population by deliberately delaying and discouraging student evaluations. It also eliminated hundreds of special education teaching positions and created a list of “exclusionary factors” to disqualify students from receiving services.

Some HISD teachers said the district’s cap was part of an effort to stop the “overidentification” of African American students as needing special education. If that is so, the effort contradicted recent research that suggests minority students are less likely to be identified for special education services than white students.

“The fact that a given black student is less likely to be placed in special education than an otherwise identical white student is deeply troubling,” said Georgetown University professor Nora Gordon. “We do not want to live in a society where parents describe access to dyslexia (or other) services as ‘a rich man’s game.’ ”

No, we don’t. Yet, the speed at which HISD in just four years reduced its special ed population from about 10 percent of its 210,000 students to about 8 percent suggests it didn’t show proper concern for students with learning disabilities who were falling through the cracks. Neither did the state seem overly concerned about those students when it imposed its special ed cap.

Removing the enrollment cap was only part of the solution. Schoolchildren must be properly evaluated to make sure those who should be in special education are given a seat, and that those who can learn in a regular classroom aren’t being improperly classified. In either case, adequate funding to ensure each student’s public education must be provided.

The old saying about paying now or paying later comes to mind. Texas’ fate rests with its children. There should be no hesitation to invest more in their education. It will pay off big in the end.