Shaquille O'Neal and Charles Barkley often clashed when they competed against each other in the NBA

Shaquille O'Neal and Charles Barkley's infamous fight during a 1999 NBA game was settled off-court, all thanks to their moms.

During an interview on The Tonight Show Starring Jimmy Fallon this week, O'Neal, 48, recalled how his mom, Lucille O'Neal, and Barkley's mom, Charcey Glenn — who were best friends at the time — forced the NBA legends to make amends after they got into a physical altercation during a Lakers vs. Rockets game more than two decades ago.

"Me and Charles had a fight, so he hits me in the head with the ball," O'Neal told host Jimmy Fallon. "And I'm like, 'Charles I respect you but now I gotta knock you out.' So I lunge with the left, I wanted him to come on the inside, but he went on the outside, grabbed me, pulled me to the ground."

O'Neal, who said that the fight with Barkley, 57, "wasn't real," returned to the locker room after the tussle and received an unexpected phone call.

"So on two-way was my mom and Charles Barkley's mom," he said, adding that Glenn, who died in 2015 at age 73, "was a lovely, beautiful woman."

"And I was like, 'Hello?' and she's like, 'This is Charles' mom and your mom's on the phone too.' " O'Neal recalled. "I was like, 'Yes ma'am, how are you?' She said, 'Y'all need to stop. I already talked to Charles. He's gonna meet you in the hallway. Y'all need to stop and hug. Y'all are two of the greatest players in the world, we don't want y'all fighting in front of the kids, y'all stop that.' "

Shaquille O'Neal; Charles Barkley
Shaquille O'Neal; Charles Barkley
| Credit: Scott Cunningham/NBAE via Getty Images
Shaquille O'Neal; Charles Barkley
Shaquille O'Neal; Charles Barkley
| Credit: Theo Wargo/WireImage

Immediately, O'Neal listened to Glenn's advice. "So I got into the hallway, me and Charles, we hug it out."

"When you play sports, it's like a spur-of-the-moment thing. It's never personal," the famous athlete explained to Fallon. "Not that I hate him, but when you throw a ball at me, I got to knock you out, boy boy. You already know what I'm going to do to you boy."

O'Neal began his career in the NBA in 1992 before retiring in 2011, while Barkley retired in 2000 after 26 years playing in the league.

Currently, both retired athletes serve as analysts on Turner Network Sports' post-game show, Inside the NBA, alongside Kenny Smith and Ernie Johnson. The show has won nine Emmy Awards, three of which have gone to Barkley.