She knew she was in afoul of trouble when she saw the police car behind her.
The player went afoul of the rules and was disqualified from the game.
The hikers went afoul of danger when they ignored the warning signs.
The protestors went afoul of authority when they refused to disperse.