Nearly a dozen corrections officers were taken to the hospital Wednesday suffering from exposure to pepper spray after several inmates refused to be searched inside the Manhattan Detention Complex, authorities said.

The officers were in a confined space inside the detention center on White Street, near Centre Street, at about 2:30 p.m. trying to get the seven inmates to come out of their cells, a Department of Corrections official said. They were conducing searches at the time.

When the inmates refused, the officers used the pepper spray. But exposure to chemicals sent 11 of them to the hospital, though all injuries were considered minor.

And FDNY spokesman said 14 people were taken to New York-Presbyterian/Lower Manhattan Hospital. The discrepancy in number of people transported was not immediately clear.

No inmates were injured, a spokeswoman for the DOC said in an email

“The safety of our officers is Commissioner Ponte’s number one priority,” the spokeswoman said. “That is why we have launched a comprehensive program of meaningful reform that includes many measures to improve officer safety — such as providing officers with specialized training in conflict de-escalation and mental health first aid.”