Last week, both the Tennessee House of Representatives and Senate passed a bill to cut the entire $436,000 (£301,000) state appropriation for an office at the University of Tennessee at Knoxville that promotes diversity at the state's flagship university.

Republican legislators in both houses have for months been criticising the diversity office, which students have been rallying to support.

On Tuesday last week, hundreds of students walked out of class to protest the bill, and many of the students sat on university walkways to block movement.

Many students who marched in the protest said that a Confederate flag hanging outside a dormitory window they passed offered a perfect illustration of why the university needs the diversity office.

It remains unclear whether Governor Bill Haslam, a Republican, will sign the bill. A spokeswoman said via email only that he would review the legislation before taking any action.

The legislation that passed was in some ways less severe than earlier versions of the bill. The version that passed would bar state spending on the office only in the coming budget year, while some earlier versions of the bill would have created a permanent ban. The version that passed would shift the funds to minority scholarships for engineering students. The original version would have spent $100,000 of the funds to pay for decals saying "In God We Trust" to be used on law enforcement vehicles.

Even if the bill was less restrictive than it might have been, pro-diversity advocates at the university were quick to denounce the legislation.

The university system's president, Joe DiPietro, issued a statement saying that "we hoped the Legislature would understand our need to support and advance a culture of diversity and inclusion on our campuses". He added that "our commitment to diversity and inclusion hasn’t changed," and that he would be working with leaders of the Knoxville campus on how to move forward.

Jimmy G. Cheek, chancellor of the Knoxville campus, issued a statement saying that "our commitment to diversity and inclusion has not been diluted. Diversity remains a priority for us and we will continue our efforts to make sure everyone on our campus is valued and respected. While we are disappointed that the Legislature chose to remove funds from the Office of Diversity and Inclusion, we remain committed to creating a welcoming environment."

The criticism of the diversity office in the last year has focused on several incidents in which efforts by the diversity office to promote inclusion were attacked by conservative politicians.

In September, legislators attacked the diversity office for issuing a guide on the language that many transgender and gender nonconforming people prefer to use to refer to themselves, such as "they" or "ze" instead of "he" or "she". The guide was similar to materials used on many campuses and in no way banned (as critics suggested) the use of traditional pronouns for people who prefer them.

Amid outrage in the Legislature, the university removed the guide. Even though the guide was removed, it was cited by many legislators as a reason to kill the diversity office.

The office was in the news again in December when it issued recommendations on how to make holiday parties inclusive for people who may not celebrate Christmas.

While the Knoxville campus featured no shortage of Christmas parties and decorations, the university was accused of being part of the "war on Christmas". The diversity office clarified that it was not trying to ban Christmas, but a number of legislators demanded the ousting of Cheek.

Many legislators also said that the legislation was needed to stop Sex Week at the university, which has long been controversial (and long been financed with funds that don't come from the state).

Micah Van Huss, a state representative who pushed for the funds to be cut off, said the bill would send a message to campus leaders.

In a Facebook post, he wrote: "Nothing opens the closed minds of administrators like the sound of pocketbooks snapping shut."

This is a version of an article that first appeared on Inside Higher Ed