Quebec City - Ice Cube co-wrote one of the defining protest songs against police brutality and, at a moment of soaring tension with US law enforcement, the rap legend did not hold back.
"The police tried to tell us what we can't play!" Ice Cube, likely referring to past rather than present bids to muzzle him, told a rain-soaked crowd on Saturday night at Quebec City's summer music festival.
Ice Cube ripped into Fuck tha Police and, to the delight of the predominantly youthful and white fans, asked them to raise their middle fingers as images of armed officers flashed on a screen.
The 1988 song by his former group, gangsta rap pioneers N.W.A., initially stunned listeners with its merciless indictment of police treatment of African Americans yet has become one of the best-known songs in hip-hop.
But Ice Cube's decision to play the song was especially defiant two days after a sniper shot dead five officers in Dallas amid demonstrations over the latest two killings of African Americans by police.
Ice Cube on social media has kept the focus on police brutality, sharing stories of abuses and urging President Barack Obama to rein in police, declaring his campaign with the hashtag #Theorisation.
Yet Ice Cube relegated Fuck tha Police to early in his set in Quebec City - which he affectionately called "QC" - as he focused more on entertaining and proving his bona fides.
"I don't care about the rain; I can do this all night!" the 47-year-old rapper turned actor said as he showed off his strut.
Ice Cube invited "the ladies" of Quebec City to dance to Kool and the Gang's infectious Jungle Boogie and, after performing his classic It Was a Good Day, left the stage to James Brown's The Boss, an appropriate closing song with its blend of funk and audacity.
The Dallas killings have brought condemnation from the Black Lives Matter movement and a number of artists who have championed the protesters.
Pop superstar Beyonce - who had urged fans to contact lawmakers to end the "war on people of colour and all minorities" - voiced grief for the slain officers, saying, "No violence will create peace."
"To effect change we must show love in the face of hate and peace in the face of violence," she wrote to her more than 77 million Instagram followers.
Snoop Dogg, who like N.W.A. emerged from Southern California's gangsta rap scene, led a peaceful march to the Los Angeles Police Department and appealed to new recruits for dialogue.
"Let's talk about it, because once the talking is over with, there ain't nothing to talk about," he said.
Professor Griff of Public Enemy, along with N.W.A. a defining political force in hip-hop, forcefully declared that he does not advocate killing police after a photo, apparently a selfie, emerged of him with Dallas shooter Micah Johnson.
Public Enemy frontman Chuck D voiced outrage at the suggested connection, saying it was no different than blaming The Beatles after California commune killer Charles Manson seized on their song Helter Skelter.
"Personally I have always had some respect for police officers as humans. But their system of law is flawed," Chuck D tweeted.
The festival, known in French as the Festival d'ete de Quebec, runs for 11 days across the historic city. The coming week will feature pop star Selena Gomez, funk rockers Red Hot Chili Peppers and British pop all-stars Duran Duran.
Saturday was devoted to hip-hop, with other acts including Mississippi brothers Rae Sremmurd who managed to put on their fast-paced, leg-contorting dance routine amid persistent rain.
The evening began with Belly, the Palestinian-born, Ottawa-bred rapper who in May cancelled a coveted appearance on late-night US show Jimmy Kimmel Live because presumptive Republican presidential candidate Donald Trump was present.
Belly - who would be affected if Trump is elected and goes ahead with his vow to close the United States to foreign Muslims - invited the Quebec crowd to raise their middle fingers and shout a profanity against the billionaire.
Among the lesser-known but hardest-working acts at the festival, Toronto punk band The OBGMs also led a chant against Trump as frontman Densil McFarlane assiduously whipped a mostly uninitiated crowd into a frenzy.