Methods and compositions are provided for the treatment of pain and cystic fibrosis. The methods include administering to an animal a composition or a pharmaceutical formulation comprising a therapeutically effective amount of a Prostatic Acid Phosphatase (“PAP”) polypeptide, or an active variant, fragment or derivative thereof, or a therapeutically effective amount of an activity enhancing PAP modulator. PAP is provided as a treatment for chronic pain including neuropathic and inflammatory pain in animals and humans. The PAP, or the active variant, fragment or derivative thereof, or the activity enhancing modulator of the PAP is administered via one or more of injection, intrathecal injection, oral administration, a surgically implanted pump, stem cells, viral gene therapy, or naked DNA gene therapy. Intrathecal injection of PAP functions as an analgesic and reduces thermal sensitivity in mice. PAP can reduce chronic mechanical and thermal inflammatory pain in mice. Allodynia and hyperalgesia due to nerve injury can be prevented by increasing PAP activity in spinal cord.