Start up

I have a 1999, 1.6 automatic Liftback Corolla. On start up one morning the ignition started but the engine struggled to turn over. I did this twice and each time I had my foot lightly on the accelerator.
A tried a third time and this time I kept the accelerator to the floor. At first the engine wasn't ticking over then very gradually it started to rev a little and I watched the rev counter which slowly raised, still keeping the accelerator fully down. Then suddenly the revs went right up with the engine and I very slowly let the accelerator up until I realised the engine was running normally and idling ok.
Everything fine on the road. Following morning, the car started perfectly fine. Any ideas as towhat mighthave caused this?