Cleveland Cavaliers owner Dan Gilbert says LeBron James' tweet calling President Donald Trump a "bum" prompted his phone to be flooded with messages that served as an eye-opener for Gilbert as to the state the country is in.

"I received voicemails after LeBron tweeted that were some of the most vile, disgusting, racist [messages]," Gilbert said Friday on CNBC's "Squawk Box." "There's an element of racism that I didn't even realize existed in this country this much."

James criticized Trump last weekend after the president rescinded his invitation to the Golden State Warriors to celebrate their NBA championship with a visit to the White House.

U bum @StephenCurry30 already said he ain't going! So therefore ain't no invite. Going to White House was a great honor until you showed up! — LeBron James (@KingJames) September 23, 2017

James also took issue with Trump calling out NFL players for kneeling during the national anthem as a form of protest, declaring, "The thing that frustrated me, pissed me off: He was using the sports platform to divide us."

Gilbert said he saved the voicemails but hadn't told James about them yet, adding that by mentioning them on television, the Cavs superstar obviously would find out.

"The thing is, I mean, some of the most disgusting things I've ever heard people say," Gilbert said. "And you could hear it in their voice -- the racism. It wasn't even really about the issue, and that's what really got me, because they went to who they really are, some of them."

Cavs owner Dan Gilbert said the voicemails he received after LeBron James tweeted about President Donald Trump exposed "an element of racism that I didn't even realize existed in this country this much." Ezra Shaw/Getty Images

James and Gilbert have had their ups and downs. In June, James posted a video on Uninterrupted in which he revealed that his mother, Gloria James, was still upset with Gilbert four years after her son left the Cavs and did not endorse him leaving Miami to go back to Cleveland. However, multiple sources told ESPN that Gilbert and James were in touch more this offseason than they had been during any other offseason in their professional relationship, which has spanned a decade and a half.

Gilbert has been associated with Trump in the past after his company, Quicken Loans, donated $750,000 to the president's inauguration party. He was called a "great friend" and "huge supporter" by Trump when Gilbert happened to be visiting the White House the same June day the Chicago Cubs were honored for their World Series win. Gilbert issued a statement this week seeking to clarify his political leanings.

"Our interests are in the policies at the federal level, and not the politics surrounding the elections," the statement read in part. "We have often supported both political parties in the same election so that we have the ability to impact positive change, regardless of who occupies the offices."

Both Gilbert and his wife made $75,000 personal donations to the campaign of Hillary Clinton -- whom James publicly endorsed -- and Gilbert made a significant financial contribution to one of Trump's opponents for the Republican nomination, Chris Christie.

"Our focus with any office holder or politician is about the communication of the still substantial needs of our former rust-belt cities that are now finally beginning the road to recovery and growth that other parts of America have been experiencing for a long period of time," the Gilbert statement continued, referring specifically to Detroit and Cleveland, where the majority of the Cavs owner's businesses are located.

Gilbert also voiced support for James' and other athletes' political outspokenness.

"Professional athletes, owners and the leagues themselves, as well as the country, would greatly benefit from an open, inclusive dialogue that would allow the expression of all views and concerns that have recently become hot topics in professional sports," the statement said.

After hearing James elaborate on his position against Trump at the Cavs' annual media day Monday, Gilbert told staffers he was proud of the star for his willingness to take a stand.