A central Florida county sheriff says a deputy who was serving a search warrant as part of a prostitution investigation is in critical condition after a shootout.

Brevard County Sheriff Wayne Ivey said at a press conference early Friday morning that a group of deputies went to a home in Port St. John to serve the warrant and take a woman into custody.

Ivey says as the deputies approached the residence, a man inside opened fire. The deputies returned fire.

The sheriff says one deputy was shot and is in critical condition in surgery.

He says the shooter was also injured and is in stable condition at a hospital. The female suspect was taken into custody for questioning.

No identities were immediately released. Ivey says authorities don't know the male suspect's relationship with the woman.