Nicki Minaj told the crowd at the BET Awards that she was close to death recently — an experience that has helped her be herself.

The rapper rambled onstage when accepting her fifth consecutive win for best female hip-hop artist, where she thanked Lil Wayne for his support, talked about writing her own lyrics and about getting the credit she deserves in the industry.

"The other day, literally I didn't tell anybody this, I really thought I was about to die. Like, I was saying my prayers to die. And I didn't even want to call the ambulance because I thought, 'Well if I call the ambulance, it's going to be on TMZ,'" she said, as some of the audience laughed.

Lionel Richie accepts the lifetime achievement award at the BET Awards at the Nokia Theatre on Sunday, June 29, 2014, in Los Angeles. (Photo by Chris Pizzello/Invision/AP) (Chris Pizzello/Chris Pizzello/Invision/AP)

"And I would rather sit there and die," she added, looking to the crowd. "And it made me realize I don't care what anybody got to say. I'm going to do me."

Minaj performed her latest single, "Pills N Potions," and also won best group with her Young Money bandmates, which includes Lil Wayne and Drake.

A video of Beyonce and Jay Z performing "Partition" closed the BET Awards, which aired live from the Nokia Theatre L.A. Live on Sunday.

Pharrell's ubiquitous "Happy" kept a smile on the musician's face: The song won video of the year. His win for the top prize came in the second hour of the four-hour ceremony. Last year, the network didn't announce the top award in the jam-packed show.

Advertisement

Pharrell thanked his family, fans who elevated the song to No. 1 and BET for its support.

"(BET) allows us as black people to be different and do what we do," he told the crowd. "You guys keep the lights on for us."

The multitalented Pharrell, who also won best male R&B/pop artist, kicked off the show with a playful performance of "Come Get It Bae" featuring the reclusive Missy Elliott. Host Chris Rock also succeeded with back-to-back jokes about Donald Sterling, the hit series "Scandal" and rapper Rick Ross, who he mentioned multiple times. He passed out food from Roscoe's House of Chicken and Waffles, playing off of Ellen DeGeneres pizza party at the Academy Awards.

Lil' Wayne performs at the BET Awards at the Nokia Theatre on Sunday, June 29, 2014, in Los Angeles. (Photo by Chris Pizzello/Invision/AP) (Chris Pizzello/Chris Pizzello/Invision/AP)

It helped take attention away from a fatal shooting and a separate stabbing at unsanctioned parties celebrating the ceremony. One person was killed and five injured in separate incidents ahead of the show, Los Angeles police said. The events were "unauthorized and unaffiliated with the BET Awards," BET said in a statement.

The death and four of the injuries followed gunfire early Sunday at a restaurant. Separately, a man was stabbed in the stomach Saturday night at a nightclub.

The show featured a medley of hits from Usher and Iggy Azalea performed her anthemic "Fancy," which is spending its fifth week on top of the Billboard charts. Chris Brown sang and danced his signature moves to his latest Top 10 hit, "Loyal." He sported a long plaid coat, and Lil Wayne and August Alsina also wore plaid-infused ensembles. The trend for women: skin tight white dresses.

Jhene Aiko, left, and John Legend perform at the BET Awards at the Nokia Theatre on Sunday, June 29, 2014, in Los Angeles. (Photo by Chris Pizzello/Invision/AP) (Chris Pizzello/Chris Pizzello/Invision/AP)

Robin Thicke, who sang and played piano, dedicated his performance of "Forever Love" to his wife Paula Patton, whom he is separated from. He said "I miss you and I'm sorry" and the performance ended up with a photo of former couple.

John Legend sang his groove "You and I" and was joined by rising newcomer Jhene Aiko, who won over the crowd by singing "The Worst" as Legend played piano.

Alsina, also a rising star, was also a powerhouse with his vocals during his performance, which featured Brown and Trey Songz. Alsina was tearful when he won the night's first award for best new artist.

"I represent the struggle," the New Orleans newcomer said onstage. "This award is not for me, it's for the people."

When winning the viewer's choice award, where he beat Beyonce and Drake, Alsina said: "I ain't gon' cry this time!"

Lionel Richie, the lifetime achievement award recipient, was serenaded by Legend, Ledisi and Yolanda Adams, who sang a rousing rendition of "Jesus Is Love." She earned a standing ovation.

"I'm glad I sang the song first. Otherwise, I would not be here onstage," Richie said, holding his award. He excitedly performed "Easy Like Sunday Morning" and "All Night Long (All Night)."

A tribute to 90s R&B was met with praise, too: Groups like Silk, Color Me Badd and Troop performed well-known jams that enticed the crowd.

Host Chris Rock speaks on stage at the BET Awards at the Nokia Theatre on Sunday, June 29, 2014, in Los Angeles. (Photo by Chris Pizzello/Invision/AP) (Chris Pizzello/Chris Pizzello/Invision/AP)

The late icons Maya Angelou and Ruby Dee were remembered in words by Phylicia Rashad, who earned a stirring applause when she walked onstage.

Drake, Beyonce and Jay Z were top nominees with five each. Drake, who was originally set to perform, did not attend. He won best male hip-hop artist and Beyonce won female R&B/pop artist. Her hit with Jay Z, "Drunk In Love," won best collaboration.

Lupita Nyong'o, who won an Oscar for "12 Years a Slave," was named best actress. Her co-star Chiwetel Ejiofor won best actor and their movie won best film.