A lecturer at the University of Virginia is taking time away from the classroom after he compared the Black Lives Matter movement to the Ku Klux Klan in a recent online post, university officials said.

Douglas Muir, an adjunct lecturer for the university’s School of Engineering and Applied Science, made the comment on Oct. 4 in response to a Facebook post by a real estate agent attending an event featuring Black Lives Matter co-founder Alicia Garza.

“Black lives matter is the biggest rasist [sic] organization since the clan,” Muir replied. “Are you kidding me. Disgusting!!!”

Muir’s response, which has since been deleted, prompted a flurry of criticism online, where some noted the misspelling in his original post, and from university officials who said it raised “serious concerns” about the school’s commitment to inclusion.

“While free speech and open discussion are fundamental principles of our nation and the University, Mr. Muir’s comment was entirely inappropriate,” university officials said in a statement. “UVA Engineering does not condone actions that undermine our values, dedication to diversity and educational mission.”

Muir, who teaches entrepreneurship in both the university’s School of Engineering and Darden School of Business, has “agreed to take leave” from the school and is preparing to release his own statement, university officials said.

“UVA Engineering is educating the nation’s future leaders, problem-solvers and policy makers,” the statement continued. “We expect our faculty and staff to create a climate that supports and engages all. This incident has illuminated the need for further dialogue.”

Attempts to reach Muir, of Charlottesville, were not successful on Monday. According to his university faculty website, Muir is also a “seasoned restaurateur” with family-style Italian eateries in Charlottesville and Richmond.

An employee who answered the phone Monday at his Charlottesville eatery, Bella’s, said Muir had not been at the restaurant since the controversy erupted.

“He’s not available, he hasn’t been in the restaurant since this all happened,” the employee told The Post. “Obviously, people are upset, so he hasn’t shown his face.”

Muir’s post also caught the eye of Charlottesville City Councilman Wes Bellamy, who called for a boycott of his restaurants.

“I didn’t expect this from him, but if this is how he feels, he doesn’t have anything else to say to me,” Bellamy wrote on Instagram. “I would encourage everyone in the city to boycott the restaurant.”

Bellamy’s post continued: “The notion that #BlackLivesMatter can be comparable to the Klu Klux Klan is not only incredibly misguided, but goes to show the lack cultural awareness [sic] that still plagues many professors at our Universities across the country. An organization, a movement, a collective body that aims to empower Black People, and rally allies is not a terroristic organization, but one that aims to collective bring people together to address systemic oppression and racism, amongst other things, is here to stay.”

Bellamy told The Post on Monday that he’s glad Muir has taken a leave of absence.

“I believe that the University of Virginia should not allow Mr. Muir to be placed in front of students again until he has had a great deal of cultural competency training and professional development,” he wrote in an email to The Post. “I have spoken with Mr. Muir, and he has stated to me that he is remorseful for his words, and I appreciate that. However, that does not change the fact that he needs to be educated on just exactly what Black Lives Matter is all about; putting an end to systemic oppression and injustice, and the need for us to work together to break down these barriers. He has received backlash on social media, but he has also received a great deal of praise, and in my opinion, that shows just how divided our community and our country is.”

University officials apparently were alerted to the offensive post when a Twitter user informed them on Wednesday, saying it’s “unacceptable” for a university lecturer to compare Black Lives Matter with the Ku Klux Klan.

Tom Katsouleas, executive vice president and provost of the University of Virginia, said he was “disturbed and saddened” by Muir’s post.

“This statement is inconsistent with the University of Virginia’s values and with its commitment to the principles of academic freedom,” Katsouleas said in a statement. “The University of Virginia stands firmly against racism and social injustice of any kind.”

Muir’s comments do not “foster intellectual exploration, nor do they encourage the voices of others,” Katsouleas’ statement continued.

Muir has previously worked as an airline captain for US Airways, according to his University of Virginia faculty web page. He’s currently trying to expand his stable of Italian restaurants.

“He is in the planning stages of opening three more Bella’s Restaurants in Virginia before exiting the company to a hedge fund in 2017,” the website reads.