Help needed quickly

I have an 89 mustang 5.0. The problem I have is that sometimes when I go to start the car it will start and then quickly die like the ignition looses power. Now there is a ticking sound coming from the dash that sounds like the turn signal noise but it's a slightly different sound and the dash lights come on and off. Possibly a relay turning on and off. I thought it was most likely a bad ground so I replaced the negative cable. And checked the ground that went to the inner fender, but this did not help.
 
Do the dash lights flash in cadence with the relay sound? Could be remnants of an old alarm system that's passively armed. I dont know why it would start though, unless the starter kill is tied into the fuel pump circuit and you have enough fuel pressure intially for the car to start.

Sound plausable?
 
Is the door open when this ticking noise happens?... I noticed mine seemed to almost tick when the battery had almost no power and the door was open... It is supposed to ding if i remember correctly to let you know your key is still in the ignition. That's my only guess here. I don't know what else it could be really. I would check all the grounds and make sure the battery is good and holding charge if it happens when the door is open.
 
thanks

The ticking sound and lights was an alarm system. I unplugged it and it went away. If I had looked down in the first place the blinking light would have gave it away, but the starting problem is still there. The idle surges up and down now from 500-1500 rpms. Any ideas?
 
What I would do is take the alarm completely out and put all the wires back together. My buddy bought a stang that had some fancy Viper alarm in it. It wouldnt idle and would lock itself. The guy he bought it from lost the remotes. Somehow the alarm got armed, dont know how, and the car wouldnt start. He just removed the alarm and put the wires back together and everything was alright.