'Danger' originally meant 'a lord's power over you' — from Latin 'dominus.' Peril came later.
The possibility of suffering harm, loss, injury, or death; exposure to peril.
From Old French 'dangier' (power, authority, control, jurisdiction), from Vulgar Latin *dominiārium (power of a lord), from Latin 'dominium' (sovereignty, ownership), from 'dominus' (lord, master), from 'domus' (house), from PIE *dem- (to build, house). The original meaning was not 'peril' but 'the power of a lord' — to be 'in danger' was to be within someone's jurisdiction, under their authority, at their mercy. The semantic path ran: lordly power → being at a lord's mercy → being at the mercy of circumstances