Just days after the Sept. 11 terror attacks, New York City asked St. John’s University if it could use its lower Manhattan campus as a respite center for volunteers helping those affected by the incident.

St. John’s agreed, donating the use of its 10-story Murray Street building, which sits a couple blocks from the World Trade Center site and was slightly damaged in the Twin Towers collapse.

The university moved all its students, faculty and classes to its main facility in Queens.

Then the city signed a contract with the American Red Cross to run the respite center, and volunteer staffers provided services to the devastated area for four months.

“We want to help the neighborhood heal, become whole again,” the Rev. Michael J. Carroll, an executive vice president at St. John’s, said at the time.

It was an act of generosity that has brought unintended consequences: St. John’s now is being sued in a complex legal battle centering on the health claims of 9/11 workers who were based at the Murray Street site.

The university’s insurer, Lloyd’s of London, had refused to indemnify St. John’s, saying it will not pay for the workers’ damages because they involved claims of “seepage, pollution, or contamination” that are not covered under the university’s policy.

Then Lloyd’s turned around and sued the American Red Cross, arguing it should bear the costs for these workers’ health-related ailments. Philip Touitou, an attorney representing the Red Cross, said that in the aftermath of the terror attacks “the organization — made up of volunteers — [was] making a very sincere effort to help people during those tragic days.”

“This is an example [of the adage] that ‘no good deed goes unpunished,’ ” Touitou said of Lloyd’s lawsuit.

The legal action stems from claims by nearly 20 environmental cleanup contractors hired by St. John’s to sanitize and refurbish the Murray Street building following 9/11.

The environmental contractors, along with a Red Cross volunteer, say they suffered health consequences from being exposed to airborne toxins and contaminants and other hazardous chemicals during the demolition work at Ground Zero.

Those lawsuits are now before a Manhattan federal judge who is handling the mass of consolidated 9/11-related litigation.