Fuel injection in compression-ignition (diesel) engines occurs at the end of the compression stroke. This is to achieve auto-ignition due to the high temperature of the compressed air.