H reg, mini 998cc with no engine mods but new plugs and leads. - im sure you will probably realise im a learner!

here goes -
when i turn the ignition, the car starts no problem - maybe a few seconds later the engine conks out - this can also happen when driving down the road some time after starting (when the engine is hot).
The worse scenario so far is the following: driving down the road, the engine dies. if i turn the ignition the engine will start again but may immediately stop after i release the key. - i understand how dangerous this is (keeping ignition turned)
somebody i spoke to thought it was an electrical problem - something to do with the primary ignition current being too weak so when the ignition is turned the larger current keeps the engine running.
this problem doest happen every time the engine is started, but probably once a day.
ive cleaned all the terminals on the coil and distributor. could the fault be with the battery itself??
any ideas will be much appreciated!
thankyou