A measure taken in advance to prevent something dangerous, unpleasant, or inconvenient from happening.