fuel pump keeps running but won't turn over the engine. on 1994 Ford Explorer

Checked the presure 40lbs,changed the regulator, relay works. What tells the fuel pump to shut off? It's only suppose to run a few seconds than shut off but keeps running sometimes for a few minutes and engine won't start.

Asked by for the 1994 Ford Explorer
the computer turns it on for 2 seconds to prime the system. it should not run again till the motor cranks and starts.
does it have spark??

Yes it has a spark. Is the computer the only thing that tells the pump to run 2 sec. or is there something else? When it's cold it runs the pump for 5to10 min. then it might shut off then the car will start.
computer is the only control. sounds like that is your issue.