Biz Markie, a New York rapper, DJ and human beatbox who became known as the “clown prince of hip-hop” for his playful style and joyous charm, and who climbed the music charts in 1989 with his crossover hit “Just a Friend,” died July 16 in Baltimore. He was 57.

His representative, Jenni Izumi, confirmed the death in a statement but did not cite a specific cause. Biz Markie was diagnosed with Type 2 diabetes in 2010 and reportedly suffered a stroke last year.

At a time when other emcees rapped about street gangs, hustlers, radical politics or police brutality, Biz Markie brought a lighter approach to hip-hop, rapping about a beloved Brooklyn mall, the pleasures of nose picking and the inspiration that came to him while sitting on the toilet. “With his silly humor and inventive, sample-laden productions, he proved that hip-hop could be funny and melodic, without sacrificing its street credibility,” wrote All Music critic Stephen Thomas Erlewine.

A self-described “class clown of the rap business,” Biz Markie had his first and only Top 10 hit with “Just a Friend,” in which he chronicled a would-be romance with a groupie known as “Blah Blah Blah.” She says she has “a friend,” not a boyfriend, although when Biz Markie walks in on the two of them “tongue kissing,” it’s clear he’s something more. “Please listen to the message that I send,” he pleads with listeners, “don’t ever talk to a girl who says she just has a friend.”

The song took its jaunty piano melody from Freddie Scott’s “(You) Got What I Need” and featured a chorus, sung by Biz Markie, that was unabashedly off-key, helping turn “Just a Friend” into an infectious singalong staple. For the music video, he dressed as Mozart, belting out the key lines — “You, you got what I need / But you say he’s just a friend / And you say he’s just a friend, oh baby” — while wearing a powdered wig in a candlelit room.

“A lot of people didn’t like the record at the beginning,” he told Entertainment Weekly in a 2019 interview. “They would say, ‘Biz is trying to sing? Aw, the record is wack.’ But I wasn’t supposed to sing the [chorus]. I asked people to sing the part, and nobody showed up at the studio, so I did it myself.”

Complex magazine later named “Just a Friend” the funniest rap song ever recorded. It reached No. 9 on the Billboard Hot 100 and helped sell more than half a million copies of his second full-length album, “The Biz Never Sleeps” (1989), for which he and his cousin Cool V were credited as producers.

While Biz Markie continued to perform for decades, his recording career slowed after the release of his follow-up album, “I Need a Haircut” (1991), which prompted one of the most consequential sampling lawsuits in hip-hop history. One of its tracks, “Alone Again,” included an unauthorized sample of “Alone Again (Naturally),” the hit 1972 ballad by Gilbert O’Sullivan.

Since hip-hop’s beginnings in the late 1970s and early ’80s, artists had stitched together snatches of music to create sonic tapestries that sounded vaguely familiar, if not entirely new. Lawsuits occasionally cropped up, including when De La Soul were sued for using a sample from the 1960s band the Turtles without permission. (The suit was settled out of court for a reported $1.7 million.)

But the O’Sullivan lawsuit went further, with a federal judge ruling in December 1991 that Biz Markie had violated copyright law. He ordered the album pulled from shelves and referred the case for potential criminal prosecution, citing one of the Ten Commandments, “thou shalt not steal,” in a six-page ruling. Charges were never brought, but Biz Markie and Warner Bros. Records agreed to a “substantial” financial payment to resolve the case, according to a Los Angeles Times report.

“No court decision has changed the sound of pop music as much as this, before or since,” Washington Post music critic Chris Richards wrote in 2012. In its wake, artists were forced to obtain permission or pay for each sample — the fees are often prohibitively expensive — or to draw from obscure recordings in an effort to avoid getting caught.

In a mischievous nod to the court case, Biz Markie titled his next album “All Samples Cleared!” (1993). The cover showed him in a courtroom, playing both the judge and defendant.

He went on to record only one other studio album, “Weekend Warrior” (2003), while collaborating with artists including the Beastie Boys and Will Smith, and occasionally performing on film and television shows. Appearing in the 2002 movie “Men in Black II,” he played an alien who is disguised as a postal worker and communicates with Smith’s federal agent character via beatboxing.

Beginning in 2007, he appeared regularly on the Nickelodeon show “Yo Gabba Gabba!” He had originally been asked to lead a dance segment, but because he had a bad back he decided to create a new feature, “Biz’s Beat of the Day,” in which he taught children how to beat box. To teach a “super beat” that sounded like a turntable and drum set, he dressed as “Super Biz,” complete with a sequined cape and mask.

“I’m one of them unsung heroes,” he told The Post in 2019, reflecting on his career. “It’s like, I’m part of hip-hop, but sometimes I’m forgotten about in hip-hop.”

“It’s beautiful because it means all eyes ain’t on me,” he added, “so when I do pop up they appreciate everything they see. It’s like the McRib sandwich. It’s like the flowers outside that turn white on the bushes. It comes around when it’s getting ready to be springtime. You appreciate it.”

Marcel Theo Hall was born in Manhattan on April 8, 1964, and was nicknamed Markie when he was a boy. He rarely spoke about his family, but grew up in Harlem and moved to the Long Island village of Patchogue, where he became known as a prankster — he was said to have baked a laxative-filled cake for his high school vice principal — and started rapping as a teenager.

“My name, Biz, comes from the first hip-hop tape I heard,” he told The Post. “It was ’77, ’78, from the L Brothers,” a group that included the rapper Busy Bee Starski. “I loved Busy Bee. Busy Bee just stuck with me. My name used to be Bizzy B Markie, and after a while I put the Biz with the Markie.”

Biz Markie was initially known as a goofball member of the Juice Crew, an influential Queens-based hip-hop collective that included artists such as Big Daddy Kane and Kool G Rap. He made his recording debut in 1986, beatboxing for Roxanne Shante on the song “The Def Fresh Crew,” and two years later released his first full-length album, “Goin’ Off,” produced by fellow Juice Crew member Marley Marl.

The album included one of Biz Markie’s best-known tracks, “Vapors,” about people who started associating themselves with him only after he became successful. “Nobody wants to be there when you’re down and out / Once you’re established and got a lot of money / Everybody wanna be your buddy and honey.” The song was later covered by Snoop Dogg, and “Goin’ Off” was included in a 1998 Source magazine list of the 100 best rap albums.

In recent years, Biz Markie lived in Bowie, Md., where he filled his house with toys — “I’ve got the Six Million Dollar Man, paralympic Barbie, ‘Welcome Back, Kotter’ dolls, the Fonz action figure, the Munsters” — that he said he had wanted but couldn’t afford when he was younger.

Information on survivors was not immediately available.

“The weirdest thing about my fame is that when I’m thinking that it’s almost over it just sparks back up,” he told The Post in 2019. “I made ‘Just a Friend’ in ’89. Some people’s records die — it sprouts up. Now it’s 30 years later and it’s sprouted up again in commercials,” including ads for Papa John’s, Heineken, Pepsi and Hot Pockets.

“They’re not letting me die,” he continued. “The public, the fans, they like me around.”