Thanks tabetha and martysmartie for your help, I found the source of the problem.
A piece of the insulation on the wire going from the ignition relay to the ignition switch had melted away.
It must have been making contact with some hot surface.
I'll try and find where the heat was coming from and isolate it.
I took a picture of the culprit.