Car will not start

I have 2000 jetta.getting gas and spark. Turn key and it will run for three seconds and shut right down.any suggestions?

“getting gas and spark” is pretty vague. The spark needs to be strong and blue. The gas needs to show up in the right amounts at the right pressure.

Tell folks about maintenance - is it all up to date? plugs/wires, air/fuel filter? My first suggestion - If anything has been neglected or is near due get it up to date.

My second suggestions - Check the fuel pressure. Clean the idle air control valve (IAC), and clean the mass airflow sensor (MAF).

It may be that none of those things solve the problem - but they are all good maintenance items to do anyway.

I would be looking at fuel pump/fuel pressure, or the mass air flow sensor.

Perhaps something is causing the ECU to turn the fuel pump relay off. The relay provides switched power to a number of fuses. Check to see if power to fuse 28 (a 10a fuse) goes away just before the engine shuts down. That fuse is for the fuel pump. If power drops off then the ECU is shutting down the pump for some reason. Perhaps it isn’t seeing rev pulses to indicate the engine is running.

A faulty, or disconnected, MAF (Mass Air Flow) sensor will cause this. So, check its electrical connector!