"The patient arrived at the hospital in great pain because of the erection," surgeon Nelson Carrasco told AFP, adding that the 53-year-old had not taken a sexual stimulant or alcohol.
He said the patient, whose identity was withheld, suffers from priapism, a persistent erection of the penis often due to a blood clot in the erectile tissue.
Carrasco said the man underwent surgery at the Sullana hopsital, about 1000 kilometers (600 miles) north of Lima.
But he added, "We are looking for the cause of the priapism because if we don't find a solution it could reappear again."
The man shouldn't even have traveled all the way. The doctors could have made him rest at home while they perform the surgery on his penis at the hospital.