Is it permissible for one to masturbate in order not to commit fornication?

Is it permissible for one to masturbate in order not to commit fornication?

Answer:

This is called committing the milder of the two evils such as eating a carcass in fear of death, and this happens when committing fornication is very likely to occur.

This answer was collected from the official government Iftaa Department of Jordan.

Link