For weeks, parents and students in Texas have been fighting to reinstate James Whitfield, Colleyville Heritage High School’s first Black principal, who was suspended last month after being publicly accused of promoting critical race theory.

Teens staged school walkouts. Their parents peppered the comments of the district’s social media posts with pleas to bring Whitfield back to campus. And on Monday, nearly three dozen teachers, parents and students spoke directly to the Grapevine-Colleyville Independent School District’s board of trustees.

“Extraordinary principals like Dr. Whitfield are few and far between,” a woman who identified herself as Stacey Silverman said during the hours-long school board meeting. “The abysmal and racist treatment he has endured at the hands of this administration is unconscionable and nothing short of a witch hunt.”

Whitfield’s battle with the district in the Dallas-Fort Worth area began during a July 26 meeting when a former school board candidate publicly accused the principal of supporting critical race theory and “the conspiracy theory of systemic racism.”

In the weeks following the meeting, the district placed Whitfield on paid administrative leave. Superintendent Robin Ryan submitted a request to the district’s board, asking its members to authorize a move to notify Whitfield of Ryan’s intent to end the principal’s contract.

On Monday, the board voted in favor of the nonrenewal notice, which will force Whitfield to publicly defend his term before facing a final vote that will decide his fate in the district. Whitfield’s existing contract expires at the end of the 2021-2022 school year.

Whitfield has consistently denied promoting critical race theory and said that he is the target of political activists who want to block attempts to make schools more inclusive.

“There’s been a very calculated attack for a long time now on public education,” Whitfield told The Washington Post. “I think it’s much larger than just me — I’m just the one who is caught in this particular scenario. The attack is against anything that promotes an inclusive and welcoming environment where everybody is celebrated and everybody gets an equitable education and is treated fairly.”

“That sounds absurd,” he added, “but that is the nature of what we’re dealing with.”

The principal wrote a letter to his school’s community last summer denouncing discrimination amid historic racial justice demonstrations tied to the Black Lives Matter movement.

“Education is the key to stomping out ignorance, hate, and systemic racism,” Whitfield wrote, the Texas Tribune reported. “It’s a necessary conduit to get ‘liberty and justice for all.’ ”

No one seemed to object to Whitfield’s words until Stetson Clark — who lost a May bid to serve on the school district’s board of trustees — complained about the principal by name during the July meeting. As Clark claimed Whitfield was promoting critical race theory, members of the audience responded with shouts to “fire” the principal.

Critical race theory, an intellectual movement that examines the way policies and laws perpetuate systemic racism, has become a target for some conservative activists. Those activists, who oppose teachings about systemic racism in the United States, have urged state lawmakers to ban instruction of critical race theory, despite little evidence that the academic framework has been widely implemented in elementary, middle and high schools.

At least eight states, including Texas, have passed laws aimed at controlling how teachers engage with so-called divisive topics like racism and sexism.

One member of the school board for the Grapevine-Colleyville district has been a vocal opponent of critical race theory. Shannon Braun, who won her seat this summer, claimed during her campaign that critical race theory had “infiltrated GCISD schools.”

The school district has denied that Whitfield’s suspension and termination were connected to the protests over critical race theory, despite the timing. A spokeswoman for GCISD told The Post that Whitfield’s suspension was “not a result of the complaints made” against him.

During Monday’s meeting, a district official elaborated on the reasons behind the recommendation to end the principal’s contract. She pointed to allegations that Whitfield had “deficiencies in communication” in emails and conversations with colleagues. She also accused Whitfield of “insubordination,” “being dishonest with the media” and failing to formally report his concerns about racial discrimination following the July 26 board meeting.

“Dr. Whitfield has diminished his effectiveness by dividing large segments of the community,” she said at the lectern during the meeting. The remark led many in the crowd to erupt into jeers and protests. The board president repeatedly pounded his gavel and called for silence.

“Dr. Whitfield has diminished his effectiveness by dividing large segments of the community,” the district official repeated once the crowd fell silent, “by continuing to raise issues of critical race theory when no one in the district administration has accused Dr. Whitfield of doing so or even discussed it with him.”

But Whitfield said he believes his suspension and the district’s efforts to end his contract stem from the July allegations related to critical race theory.

“[The district has] tried to disconnect the events of the last month and a half with what’s happening with this potential nonrenewal,” he told The Post, “but in essence there’s no way you can disconnect the two.”

Those who spoke in support of Whitfield on Monday decried the lack of transparency behind the district’s decision to place Whitfield on paid administrative leave.

“Do the right thing,” a Colleyville Heritage senior named Samantha told the board members as she stood at a lectern. “Vote to keep my principal.”

Despite pleas to reinstate Whitfield — and no member of the public calling for his termination Monday night — the school board voted to approve the superintendent’s notice of nonrenewal. The board will now hear Whitfield’s case for remaining in his job before voting on whether to extend his employment.

Though Monday’s decision was unanimous, several board members said the vote was procedural and did not reflect their position on whether Whitfield’s contract should be terminated. One went so far as to apologize for not defending Whitfield after he was “unjustly attacked” in July.

“I think this moment is an opportunity to express some regret for not speaking up,” board member Coley Canter said. “I didn’t do it, and I regret that. … I am changed by this moment. Our community is changed by this moment.”

Board President Jorge Rodríguez recounted how he was “very excited” when Whitfield was hired on as principal, first at a middle school and then at Colleyville Heritage High School.

“The vote tonight, this is not about terminating Dr. Whitfield’s contract,” he added. “This is just a procedural vote, where the board decides to hear Dr. Whitfield’s side.”

Despite the setback, Whitfield said he has been buoyed by the community members who have called for him to be reinstated.

“The people who I serve directly, my families, my students, my teachers — they have been so supportive,” he told The Post. “Just seeing that level of support from people who really know my heart and what I’m about, that has meant so much to me.”