Whenever Beyoncé raps, she’s flexing. It isn’t just that verses are pure braggadocio, which they often are. The act itself is a display—a reminder that she can, that she’s great at another thing. When Jay-Z became the first rapper inducted into the Songwriters Hall of Fame, he tweeted a list of all the rappers who inspired him and emphatically added, “B a rapper too!” B has been for some time now, too. But her recent remix of J Balvin and Willy William’s “Mi Gente,” surging this week to No. 3 on the Hot 100 chart, is the glorious culmination of all the rapping she’s ever done.

Spiritually, Beyoncé has been rap royalty—before she duet-dated Jay, eventually married him, and spawned at least one kid who seems to carry the gene. Her hip-hop fluency gave her an advantage in the pop-star arms race, helping her to become the presiding voice in an increasingly rap-dominated musical landscape. Her evolution, from rap-adjacent R&B star (appearing as early as 1998 in a Geto Boys video) to reluctant hip-hop shareholder to full-blown rapper, played a role in slowly shifting the sound of pop radio.

Technically, Beyoncé was introduced to America as a member of a rap group. In 1992, early Destiny’s Child iteration Girls Tyme competed in the rap category on “Star Search.” A clip of host Ed McMahon introducing them as “the hip-hop rappin’ Girls Tyme” can be heard on Bey’s 2014 self-titled album; indeed the girls did perform a rap, as well as sing.

It wasn’t until 2001, when Beyoncé made her acting debut as the lead in MTV’s rap take on Georges Bizet’s 1875 opera Carmen, that her flow potential came into focus. For much of the part, Bey exchanged semi-forced rapped dialogue with Mekhi Phifer, who led a cast including Yasiin Bey (then Mos Def), Wyclef Jean, Jermaine Dupri, and Da Brat. Her big moment came on the Mos Def duet “If Looks Could Kill (You Would Be Dead),” where she offered up tongue-twisting lines like, “Sweetness flowing like a faucet, body banging, no corset/Brothers wanna toss it but they lost cause my game made ‘em forfeit/Slicker than a porpoise and thicker than a horse is.” The flows were a bit rusty and contrived, but you can hear the talent working.

Beyoncé’s earliest and most successful flirtations with hip-hop would come as only modest departures from her R&B safehaven: mostly melody-driven verses toying with rap cadences. After the success of 50 Cent’s breakout single “In Da Club” in 2003, Beyoncé released a cover of the song called “Sexy Lil Thug,” which closely followed the song’s structure and 50’s stresses, employing sung raps.

Over time, she would develop a style all her own: big gestures, freewheeling rhyme schemes, all swagger, slow-flowing her way through line readings of her impressive resumé. And suddenly her raps had a clear use: to give her pristine persona a much needed edge. In public, Beyoncé is humble and guarded. As a pop singer, her image is carefully curated, to the point of projecting perfection. For Beyoncé, rap provides a venue to be a little petty, or to show that she knows what she’s got. This is sport for her.