Pain derived from the Latin poena (ultimately from Greek), “penalty,” “punishment,” as in “pain of death”. At one time this usually reflected to the punitive aspect of the law. It is now generally used as pain from any source.
Poena is also familiar in the term subpoena.
From: English Words, from Latin and Greek elements
Poena is familiar in the term subpoena “sub, “under threat of”) the first words of such a writ when it appeared in Latin, which in effect had the meaning, “Under threat of punishment you are hereby ordered to be present in court.”