What Causes Anal Pain?
Most likely an Anal Fissure.
Thanks for your question.
You are most likely suffering from a Fissure-in-ano or some Doctors call it an Anal fissure.
You should see a Surgeon who can examine you and confirm the same. The problem is increased contraction pressure at your anal opening. This when faced with constipation leads to further tear of the mucosa and pain thereafter.
The best treatment is Surgery in the form of Lateral Sphincterotomy. Medical treatment can help you tide over the problem. You should take Sitz baths thrice a day, apply Lignocaine ointment at the location before and after passing stools after cleaning the area and stool softening medicines like Syrup Lactulose 20ml at night. For the pain you can take Tab Combiflam two to three times a day on full stomach
Take care and please see a Surgeon.
Do let me know if I can be of any help and any queries that I can answer.
Dr Rishi, New XXXXXXX XXXXXXX