Lil Wayne and his entourage came close to exchanging blows with Diddy‘s crew this past weekend at Liv Nightclub in Miami.

According to TMZ, the whole incident took place Sunday night (Oct 18) after Wayne attempted to say hello to Diddy in V.I.P., but was denied by Diddy’s security … and things went downhill from there.

The beef started when Diddy’s security stopped Weezy and wanted to search his posse. We’re told Wayne didn’t take kindly to that … ended up spilling his drink on a bodyguard, and then things escalated quickly — with both posses shoving each other.

We’re told Wayne and Diddy got in the middle of the fray, and there was a lot of yelling back and forth … but ultimately cooler heads prevailed. They ended up shaking hands, walking away — and, based on the vid in the club, having a great night.

We’re glad these two were able to work it out because no one wanted a repeat of the Diddy and Drake brawl at LIV last year.