Bonnie Somerville, famous for playing a detective on "NYPD Blue," had a run-in with real cops on the opposite coast ... police in L.A. say she was drunk behind the wheel.
Law enforcement sources tell TMZ ... cops were getting calls around 10 PM Sunday night for a car stopped in traffic on the 405 near Inglewood, and when officers arrived, they say they found Bonnie pulled off on the right shoulder in a Mercedes-Benz.
Our sources say Bonnie told cops she simply ran out of gas, but officers say she reeked of booze and ended up bombing a field sobriety test.
We're told Bonnie, who played Det. Laura Murphy in the final season of "NYPD Blue," was cited for DUI and later released.
We reached out to Bonnie's camp ... so far no word back.