A Confederate flag frenzy erupted and “Facebook exploded” after a black student transferred into an entirely white Montana high school — but he supports his classmates and has made friends with an admittedly racist boy who ignited the controversy.

Darius Ivory enrolled last month at Park High School in rural Livingston, which has a black population of 0.3 percent, after moving from Houston — where he was accustomed to seeing Confederate symbols, reported the Billings Gazette.

ADVERTISEMENT

“I don’t see it as a bad thing,” Ivory told the newspaper. “I’m not a slave, and it takes way more than flying a flag to faze me.”

Shortly after the 19-year-old Ivory enrolled, a rumor began circulating that a 17-year-old boy had threatened to hang and drag the black teen behind his pickup truck.

School officials identified and questioned the younger boy — who denied threatening Ivory but admitted to making negative statements about him.

“He comes out and said he doesn’t like black people and is racist,” said Tim Gauthier, the school’s vice principal. “In my 20 years as an educator, I’d never heard someone admit they were racist.”

The teen said he’d grown up in Missouri and had developed a bad perception of black people, although his parents told school officials they didn’t share their son’s racist beliefs.

ADVERTISEMENT

Administrators warned the boy he would face consequences if he continued harassing Ivory, but he drove his pickup truck to school two weeks later festooned with a Confederate flag.

Another student also displayed the Confederate flag that day at school, although Gauthier said it was purely coincidental.

A student removed the racist 17-year-old’s flag, and cell phone video captured another student burning the Confederate banner.

ADVERTISEMENT

A school resource officer told the student who burned the flag that he could be cited for theft and destruction of property, and administrators banned Confederate flags on school grounds.

That’s when things spun out of control.

ADVERTISEMENT

Students argued heatedly over the issue both in and out of class, and some of them got into shoving matches at school.

“There was no valuable education that day,” Gauthier said.

A week later, on April 29, a group of students decorated their vehicles with Confederate flags and parked off school property to protest the ban — and Gauthier insisted they were only angry about the new policy, and not for “racial reasons.”

ADVERTISEMENT

“I don’t believe that the protests now are racially spurred, and it’s just causing a lot of conflict because a lot of students still see it as that, a lot of people do,” Gauthier said.

Livingston residents who attended a community meeting about the incidents agreed.

“It’s just kind of more of a Montana redneck, hillbilly kind of thing — it’s not threatening to anybody for any reason,” said resident Colleen Wood.

Ivory said he appreciates the students who came to his defense against racist classmates, but he also backs the students who displayed the Confederate flag — which he had on his own cell phone for a while.

ADVERTISEMENT

“I don’t see anything racist about it,” Ivory said.

He asked to meet with the racist boy who’d spoken badly about him, and the pair ended up talking for about an hour.

“It was interesting,” Gauthier said. “I mean, the student didn’t pull any punches — he was clear about what he thought.”

Ivory said he understood where the other boy was coming from after the teen shared his experiences, and they’ve spent a little more time together since then.

ADVERTISEMENT

“We’ve hung out a couple times,” Ivory said. “He is a cool kid. I like him.”

Gauthier said “Facebook exploded” in the community over the Confederate flag ban and the ensuing dispute, but Ivory said he’s not bothered by the controversy swirling around his arrival at the otherwise entirely white school.

“Everyone made me feel welcome, though,” Ivory said. “Everybody thought I was awesome, obviously. To me the people here are awesome.”