Spanner in the works

Generated image of a spanner in the works
A spanner in the works or wrench in the works means something that unexpectedly causes a problem and stops a plan from working properly.

The expression comes from machinery. If a spanner/wrench falls into moving gears, it can jam the mechanism and stop the machine from working.

The sudden power outage threw a spanner in the works for the event.