A Long Island City warehouse has been transformed into a safe haven for more than 500 cats who may have been exposed to an unusual flu virus.

The quarantine center, constructed in less than a week by an ASPCA emergency field team in late December, is the city’s best chance to halt the H7N2 bird flu virus that has affected all three of its animal shelters.

“We still really have no idea how it came into the shelter,” said Dr. Robin Brennen, the medical director at the Animal Care Centers of NYC, who discovered the virus during routine disease surveillance at the shelters. “We came to the decision that it is in the best interest of the cats to move them all to a quarantine facility while we clean the buildings.”

She contacted experts at the University of Wisconsin’s Veterinary Diagnostic Lab. They determined the virus was a rare strain of avian flu — the first time it had ever spread to domestic cats.

Finding and establishing a quarantine center in the five boroughs was a herculean task. ASPCA staffers arrived just before Christmas and spent the next week finding a large site, hauling equipment, building enclosures and transporting hundreds of frightened felines from facilities in Manhattan, Brooklyn and Staten Island.

It took the combined resources of the ASPCA, ACC, the city Department of Health, the nonprofit Maddie’s Fund and rescue groups to make it happen. The 24,000-square foot facility opened on Dec. 29.

“We tried to set it up like a home environment,” said Tim Rickey, vice president of the ASPCA Field Investigations and Response, whose team has handled large-scale animal rescues around the nation. “There is bedding and perches for the cats, and we are trying to keep three to six cats in the same enclosure. We believe that cats recover better in group housing. The interaction is positive.”

It’s unclear how long the facility will remain open but it could be anywhere from 45 to 90 days, officials said.

A team of 40 volunteers and staffers cycle in and out of the facility on a daily basis to help clean, feed and provide medical attention for the cats. Each person must follow strict protocols and don head to toe protective gear to keep the virus contained.

“We are limiting the number of people who come in,” Rickey said. “We want to make sure this is a true quarantine facility.”

During a recent visit to the site, cats lounged on perches in enclosures that had food, water, bedding and toys. Detailed medical assessments were included on their cages as well as on a white board in front of each separate pod. Staffers and volunteers worked quickly to clean up and give the cats some much-appreciated attention.

“Everybody here is really excited to help these animals,” said Jessica Drew, 29, of Astoria — a seasoned responder who has experience working with large numbers of animals in crisis situations. “The setup is fantastic. We can already see them getting better and moving to the next stage. That’s a good feeling.”

Rickey estimates more than $700,000 has been spent to staff and operate the facility — a cost being shared among the agencies and rescue groups.

The protective gear alone costs about $25 per person, and workers have to change into a new suit, gloves, bootees and face shields every time they enter the quarantine area.

Meanwhile Animal Care Centers, a nonprofit which contracts with the city to handle stray, homeless and unwanted critters in the five boroughs, plans to have all three of its facilities sanitized.

People who adopted a cat from an ACC shelter between Nov. 12 and Dec. 15 should monitor them for sneezing, coughing, runny nose and runny or red eyes.

“We continue to urge New Yorkers who have adopted cats from ACC shelters to be on alert for symptoms in their pets and take proper precautions,” said city Health Commissioner Mary T. Bassett.

While officials said a majority of the 500-plus cats at the facility have tested positive for the virus, most have mild to moderate symptoms and are expected to recover.

Brennen said about five cats have died after being detected with the virus. At least two of them had underlying medical issues.

One veterinarian working with the cats at an ACC facility tested positive for the virus in December but quickly recovered. Officials said there have been no other human cases.

Experts from the Shelter Medicine Program at the University of Wisconsin’s School of Veterinary Medicine are continuing to monitor lab results. So far 32 of the cats have been medically cleared.

“Once the cats are healthy and no longer contagious, we’ll do everything we can to help them find homes,” said ASPCA President and CEO Matt Bershadker.