Sounds like an immobiliser to me - this may sound stupid, but you did disarm it again when you went to restart it didn't you?
I only ask because they are meant to be self-arming if the ignition is off for more than a couple of minutes, and that's caught me out a couple of times. Especially if I opened the doors (so the alarm is off) and put some stuff in the boot, by the time I get into the driver's seat the engine is immobilised again... and I'll sit there trying to crank it (and getting no ignition) until I realise that the <ANTILOCK> light hasn't come on and turn the immobiliser back off. What makes this even funnier is when I leave my car with someone else and they think the fob for the doors at work is the immobiliser, and wave it all over the dashboard in an effort to make the car go!
Of course, if you did disarm it, it might be acting-up and not turning off like it's meant to.
Actually... now that I re-read your post, that does sound a little like a dead battery. Enough juice to open the solenoid, but not enough to spin the motor up and engage the flywheel. Seeing as you checked that, I wonder if the big power cable to your starter has come off (or is loose) - the solenoid opens, but because it has a poor contact the motor doesn't get any power? Might explain why you get sparks when the lead touches it again momentarily.