Have a brush with (something)

To have a brief experience with something (law, death etc.).

I had a brush with the law when my car was stopped for speeding.