Mine just did this yesterday (2001 - 93 k miles) . Has always run fine every day up until yesterday.
We were on the other side of town, and got back into the ST to come home. It would start, but would not stay running without my foot on the gas a little. The RPMs would go up and down over and over again. Shifting into gear killed it.
I was able to limp home no faster than 20 mph. Foot off the gas, it would die, foot on the gas too much, it would bog down.
When I got home and shut it off, I could smell that catalytic converter rotten egg smell faintly.
Called my buddy who works on Fords all the time, and he said "its one of two things. Its either a dirty MAF sensor, or a bad connection on the throttle position sensor."
I opened the hood, and popped the air cleaner box open. I took a can of carburetor cleaner and sprayed the MAF sensor inside the tube (you can see it up inside there - looks like a vertical metal tube with a small opening in it) The actual sensor is suspended in that opening in the tube.
I also took the little "4.0" cover off, and popped off the little plug on the opposite side of the intake hose from the throttle cable. I took it off and popped it back on 4 or 5 times.
Got back in the truck, and it started right up, and idled normally. Went for a ride, and acceleration was excellent. Maybe even better than usual.
Guess my buddy was right! I just don't know for sure which thing it was that fixed it.
-Zim