A hard lump behind the anus hurts

There are two possibilities: first, thrombosed external hemorrhoids, which are caused by the formation of local blood clots in external hemorrhoids and are accompanied by more intense pain, and the hard mass is higher than the surface of the skin, dark purple and hard in texture. The second is probably a perianal abscess, a perianal abscess is a purulent inflammation around the anorectum caused by an anal gland infection. It is recommended that patients go to the hospital in time to get a clear diagnosis and then take the appropriate treatment.