IT’S NOT just your Catholic Sunday school teacher who lays down the law when it comes to your sexual habits.

It turns out even leaders of global terror networks have a bit to say about the act of self-love.

A letter from Osama bin Laden detailing the do’s and don’ts of masturbation for jihadists has been released.

The letter was one of 50 documents seized in 2011 from the Al-Qaeda leader’s compound in Abbottabad, Pakistan, following his assassination.

Bin Laden, who claimed responsibility for the September 11 attacks, went as far as to dictate when and under what circumstances his minions were allowed to touch themselves.

In a memo marked “top secret”, he acknowledged that terrorists were allowed to masturbate when they were in a “state of extreme need”.

“Another very special and top secret matter — it pertains to the problem of the brothers who are with you in their unfortunate celibacy and lack of availability of wives for them in the conditions that have been imposed on them,” the letter reads.

“We pray to God to release them. God is not ashamed of the truth.

“As we see it, we have no objection to clarifying to the brothers that they may, in such conditions, masturbate, since this is an extreme case.”

The letter goes on to say that the act of self-love has been “approved” by “the ancestors”, advising jihadists to — well — give themselves a helping hand.

The order concedes some jihadis might be “ashamed”, and goes on to pull out some bizarre feedback.

“Such a practice may also have unnoticed negative side effects,” the letter warns.

“We wanted to reflect some more and research it, and we want to get back to you on it before you say anything about it. Give us your opinion — is it appropriate?

“Can it be suggested to the brothers? If so, how? Can we consult with your Shari’ah experts and send them a memo containing our initial findings?

“We would like to know what positive and negative aspects you anticipate in raising this matter.

“Do you think it can help solve the problem? Or do you think we should avoid proposing it, and rather stick to the recommendation of total patience and seek help through fasting?”

Ultimately though, the overall message is that masturbation in the absence of sweet copulation is A-OK.

When you think about it, the notorious terrorist’s liberal-ish view on solo sex should hardly come as a surprise.

In 2015, US authorities uncovered a secret porn stash in bin Laden’s secret compound.

The porn stash was included in tranche of 103 letters, videos and reports seized by US Navy SEALs when they descended on bin Laden’s hide-out and shot him dead.

It was found after authorities combed the contents of five computers, 10 hard drives and CDs whose ownership and age are not known.