run afoul of
run afoul of (someone or something)
1. In sailing, to collide or become entangled with something. The schooner lost control and ran afoul of the lead boat. The small powerboat ran afoul of the seaweed and was completely immobilized.
2. To be in severe disagreement, trouble, or difficulty with someone or something; to be at odds with someone or something, especially due to disobeying rules or laws. Always look into the laws of any place you visit, or you may end up unwittingly running afoul of the local police. Ms. Banks has run afoul of this university for the last time. She is no longer welcome here!
Farlex Dictionary of Idioms. © 2015 Farlex, Inc, all rights reserved.
run afoul of
Also, run foul of. Come into conflict with, as in If you keep parking illegally you'll run afoul of the police. This expression originated in the late 1600s, when it was applied to a vessel colliding or becoming entangled with another vessel, but at the same time it was transferred to non-nautical usage. Both senses remain current.
The American Heritage® Dictionary of Idioms by Christine Ammer. Copyright © 2003, 1997 by The Christine Ammer 1992 Trust. Published by Houghton Mifflin Harcourt Publishing Company. All rights reserved.