French Montana's adamant his "Black lives matter" shout-out wasn't a wisecrack at cops -- instead he was reacting to what he saw as harassment of his crew ... for no good reason.
The rapper tells TMZ, NYPD pulled over his SUV just one block from Aces strip club where they were partying. He says the officers told them they were checking to see if the driver had been drinking.
French says his guy was sober and when all his paperwork checked out, they peace'd out.
But he thinks cops were hoping to find something more incriminating. French believes he and his friends were targeted as they left Aces because they're black and famous. He says he only yelled "Black lives matter" to remind the cops it's "pathetic" to stop him for nothing.
We reached out to NYPD for comment, so far no word back.