Blaming a running problem on the last tank of fuel is a common instinct and it is right often enough to be worth investigating. Contaminated or inappropriate fuel genuinely does cause juddering, hesitation and misfiring, and the timing relative to your last fill is what distinguishes it from a mechanical fault that happened to appear the same week.
What does water in fuel do?
Water does not burn, so a slug of it passing through produces a momentary misfire and a jerk. In a petrol engine it causes rough running and hesitation. In a diesel it is considerably more serious, because diesel lubricates the injection system and water does not, so it accelerates wear in the high pressure pump and injectors. Water contamination is the main reason diesels have a separator that needs draining.
How does water get into fuel?
Condensation in a part filled tank over time, particularly on a car that stands. Water in a forecourt storage tank, which happens after heavy rain or where a tank seal has failed. A damaged fuel filler seal on the car itself. Keeping the tank reasonably full reduces condensation, which is one practical reason not to run consistently on the last quarter.
What about the wrong octane?
Using a lower octane than the engine requires produces detonation, which the knock sensor counters by retarding the ignition timing. The result is reduced power and sometimes an audible pinking under load rather than a judder as such. It is unlikely to cause pronounced jerking on a modern car, though it will make it feel flat and use more fuel.
Does fuel go stale?
Petrol degrades over months as its lighter fractions evaporate, becoming harder to ignite. That produces long cranking, rough running and hesitation rather than a dramatic failure, and it matters mainly for cars stored over a winter rather than for ordinary use. Diesel resists ageing better but can grow bacterial contamination in a part full tank where water has collected.
What if the wrong fuel has been added?
Petrol in a diesel is the serious version, since diesel components rely on the fuel for lubrication and petrol strips it, causing rapid damage to the pump and injectors. Do not start the engine if you realise before setting off, and stop immediately if the car begins running roughly after a fill. Diesel in a petrol car generally causes heavy misfiring and smoke and is usually less damaging, though both require draining.
How do you tell fuel from a mechanical fault?
By the timing and by what happens when the tank empties. A problem that appeared within a few miles of filling and persists unchanged across the whole tank is suspicious. A problem that improves noticeably as the tank empties and disappears after refilling elsewhere has effectively confirmed itself. A fault that appeared gradually over weeks is very unlikely to be fuel.
What should you do if you suspect it?
Run the tank down as far as is practical, then refill at a busy station with high turnover. On a diesel, drain the water separator if fitted and consider changing the fuel filter, which is inexpensive and traps a good deal of contamination. Keep the receipt, since a genuine forecourt contamination incident usually affects many vehicles and suppliers do settle claims.
Do fuel additives help?
Injector cleaners from reputable manufacturers can help where deposits have built up, particularly used with a long drive afterwards, and premium fuels with detergent packages do the same more gently over time. What they cannot do is remove water or reverse mechanical wear. Used as an occasional supplement to proper maintenance they are reasonable; treated as a cure for a mechanical fault they are not.
How do you avoid the problem?
Use busy forecourts with high turnover, since fuel that has sat in a tank for weeks is more likely to have collected water. Keep the tank reasonably full to limit condensation. And on a diesel, drain the water separator at the intervals the handbook specifies rather than treating it as optional.