A Manhattan landlord is trying to evict a tenant for displaying two Confederate flags in the windows of his East Village apartment.

The court papers argue that tenant Will Green, who lives in a rent-regulated $1,141 apartment on East Eighth Street, “contractually gave up any free speech rights by his execution of the lease agreement, which bans objectionable conduct.

“The conduct of the defendant in the wake of the recent activities in Charlottesville, Va., the president’s statements related to the same and public concerns make the defendant’s actions unreasonable in character,” argues building owner Charles Yassky in the new Manhattan Supreme Court lawsuit.

“This conduct is a prohibited, anti-social and intentional act that has no valid societal purpose and is not protected by any legal theory,” Yassky says in the suit.

The building owner claims that Green’s flags — which he has illuminated at night with a spotlight from his fifth-floor unit — have created “a clear and present danger to the building, its residents and the community at large.”

Police have been patrolling the area for the past several days after protesters rallied outside the building and someone threw a rock through a window, according to the suit.

Yassky, a developer who owns residential and commercial real estate around the city and shopping malls around the country, has covered Green’s windows with tarps to try to tamp down the unrest.

“The building and its residents have expressed constant fear of physical attack and for their physical safety and well being,” the landlord says in court papers.

He attached emails from five tenants attesting to their concerns.

“I do not feel safe sleeping tonight,” one resident wrote.

Green’s two windows face the Lillian Wald Public Housing complex, “a multi-racial, diverse housing community,” Yassky notes in the suit.

In an Aug. 19 email attached to court papers, Green says he is in the mountains without cellphone service to get some “sun and to see the eclipse.”

“I’ve had those flags up for over a year. I find all the alleged commotion while i’m on vacation a little suspicious. I’ll be back in the city on Tuesday, you can update me then. Whatever the drama, ‘this too shall pas.’ (like the eclipse),” Green wrote.

Yassky has threatened to post Green’s name, phone number and photo outside the building if he doesn’t remove the flags.

Green did not immediately reply to a request for comment on the eviction suit.

The tenant has a “history of unpredictable behavior,” according to court papers, which say he once threw a television down the stairs, has played offensive music, displayed German Cross flags and even attempted suicide by jumping from a window before he was stopped by EMS.

The suit cites a 2007 Tennessee case in which a judge upheld a school’s policy prohibiting Confederate flag displays because of racial tensions.