The real estate market in New York has never been this tight.

A Lower East Side condo owner turned his small apartment into a mini-village — by converting it into an illegal duplex with 11 sub-units that had ceilings as low as 4 ¹/₂ feet high, officials said Friday.

The illegal micro apartments at 165 Henry Street are so cramped that condo owner Xue Ping Ni even put up bubble wrap as protection to keep residents from hitting their heads on the many low-hanging pipes.

The bizarre arrangement in Ni’s apartment No. 601 — which was raided and shut down Wednesday night by the city Buildings Department — was compared to something out of a movie.

“This is like the room out of the movie ‘Being John Malkovich,’” said Manhattan Councilman Ben Kallos — a nod to the “7th 1/2 floor” Manhattan office in the 1999 indie flick.

“It was funny in fiction, but a horror story in real life.”

It wasn’t clear how much rent Ni was charging for the tiny units. But the residents there were stacked like sardines, as the 11 windowless units were all carved out of the upper-areas of Ni’s single 634-square-foot condo on the building’s 4th floor.

The condo, where nine people were living, also had an illegal bathroom, inspectors said.

The tenants were relocated from the nightmarish fire hazard, when Buildings Department inspectors raided the place in response to a 311 complaint, according to residents and city officials.

Inspectors hit Ni with more than $144,000 in fines for failing to have sprinklers, along with proper electrical, structural and plumbing permits.

When The Post visited the building Friday, a reporter observed apparent additional changes to the apartment above Ni’s.

In the second apartment, No. 701 — which Ni has listed in the past as his address — air conditioning units were set up on both the top and bottom of floor-to-ceiling windows in an arrangement that appeared similar to the unit below it.

By 10:30 p.m. on Friday, officials in blue Buildings Department uniforms were back at the property — as seven tenants from No. 701 left carrying luggage or bags.

That apartment, too, had been illegally converted — into 9 single room occupancy units, a DOB spokesman confirmed early Saturday.

Vacate orders were issued for those additional tenants, who were offered immediate relocation assistance by the American Red Cross, the spokesman said.

The units lacked light, ventilation, fire protection systems and proper egress, the spokesman said, declining to confirm whether Ni was the apartment owner.

One departing tenant who didn’t want to be named told The Post Friday night that he and the others had just been ordered to vacate their tiny units in No. 701.

He said the landlord — whom he would not name — had charged him $600 a month for his cramped space, where he’d lived for the past two months.

He couldn’t say how many tenants shared apartment No. 701 with him. “I don’t know exactly how many,” he said, as he walked away carrying two large suitcases. “But there was a good amount.”

Kallos had called on DOB to investigate No. 701 too — and ASAP — with or without receiving a formal complaint.

“I’ve never seen air conditioners stacked atop one another like that — five air conditioners in three windows,” said Kallos, upon reviewing a photo of the building’s exterior.

“I can’t imagine needing that much air-conditioning in one apartment, so if someone sees this on the street, that should be more than sufficient for the Department of Buildings to also investigate that apartment.”

Another resident of the complex said short-term tenants were constantly coming and going.

“It was revolving door of people,” said a woman who pays $2,800 per month for her one bedroom apartment on the sixth floor. She has long suspected the building was dangerous.

“There use to be a lot of evacuation [vacate] notices. I just asked [management] if the building is safe because we’re paranoid and they said nothing about it,” the resident said. “The units are all set up real differently. This used to be a rabbinical school.”

Officials slammed the set-up as a life-threatening hazard.

“Every New Yorker deserves a safe and legal place to live, which is why we’re committed to routing out dangerous firetraps and ordering the landlords to make these apartments safe,” DOB spokesman Andrew Rudansky said.

“Tenants living in truncated and windowless dwelling units like this poses an extreme hazard to their safety, as well as the safety of their neighbors, and first responders – a hazard that cannot be tolerated in our city.”

He added, “We are holding this landlord accountable for their egregious failure to keep the building safe and livable for tenants.”

In city records, the complex is listed as a 5-story building with 27 legal apartments.

Ni couldn’t be reached at the building for comment Friday.

In the fantasy film “Being John Malkovich,” a failing puppeteer played by John Cusack discovers a portal into the mind of actor John Malkovich while interviewing for a job on the “7 1/2 floor” of an office on Sixth Avenue in Manhattan.

Additional reporting by Israel Salas-Rodriguez and Natalie O’Neill