Engine knocks loudly when starting/stopping

I have a 2002 Crown Victoria LX. The engine runs great with the exception of a loud knocking sound sometimes when starting or stopping the engine.



When starting, it’s a single loud knock after the engine turns over. When stopping, it’s anywhere from one to several as the engine motion comes to a stop. When it’s several (probably 4 or 5) they are quick but it’s apparent that the rate slows down slightly over time, as if it’s a moving part inside the engine coming to a stop.



It is worth noting that about one-third of the time when turning the car on or off, there is no noticeable knocking sound whatsoever. Maybe something is loose inside?



Thanks for any suggestions!

Has anyone checked the motor mounts?

It’s a timing problem.

Some car parts stores will scan the car for free and this should be your first step.
It’s possible that you’re hearing a severe spark knock on startup and dieseling during shut-off.

This could be caused by an ECM controlled fault with the ignition timing, heavily carboned up engine top end, oil consumption problem, or possibly a MAF sensor fault/air leak.

This car should run fine on 87 octane but if 87 is being used in conjunction with a known problem (oil use for instance) it’s possible the gasoline could be contributing to this.