Run afoul has 2 different meanings across 1 category:
Verb
go against, as of rules and laws
"He ran afoul of the law"
"This behavior conflicts with our rules"
To become entangled or in conflict with.