Hip hop legend Ice Cube claims to have gotten caught up in a bizarre bribery plot involving his popular BIG3 basketball league, the Qatari government, former National Security Adviser Mike Flynn — and Steve Bannon.

The rapper and his business partner, Jeff Kwatinetz, filed an affidavit in Los Angeles on Tuesday, alleging that they were both used as pawns by the Qataris in a bid to get sympathy from people in Washington.

The pair is suing for $1.2 billion under the claim that they were promised millions of dollars in investments for their 3-on-3 basketball league but never received it.

The Middle Eastern investors, instead, chose to use their money and connections with Cube to “get positive public relations for Qatar,” the affidavit says.

They only paid $7.5 million of the $20.5 million they promised — and never showed any actual interest in the league, according to the new court documents, which were filed by Kwatinetz.

Their real target was Bannon and other prominent figures in Washington, the affidavit says.

The former White House adviser was President Trump’s right-hand man before stepping down last August and is said to be close friends with Kwatinetz.

Cube’s partner has even gone so far as to call Bannon a “brilliant” businessman with “great character.”

According to the affidavit, defendants Sheikh Abdullah bin Mohammed bin Saud Al Thani — CEO of the Qatari Investment Authority — and Ahmed al Rumaihi, a former Qatari diplomat and alleged member of the royal family, both served as secret liaisons for the Qatari government.

Two other men linked to the royal family, who have also been named in the suit, were said to have invested in BIG3 as a cover for their country, as well.

“After making partial payment to the BIG3, there were numerous occasions during the 2017 season, where Mr. Al-Ruhmaihi would bring up Mr. Bannon’s name to me and comment about Mr. Bannon’s political positions, his views on the blockade, the Trump administrations position toward Qatar, and he persistently inquired about wanting to meet with Mr. Bannon,” Kwatinetz says in the affidavit. “Mr. Al-Rumaihi requested I set up a meeting between him, the Qatari government, and Steven Bannon, and to tell Steve Bannon that Qatar would underwrite all of his political efforts in return for his support.”

Kwatinetz claims that he was “appalled” by the notion of receiving “a bribe of any kind” — and declined the offer without even telling Bannon about it.

He says that that Al-Rumahi “laughed and then stated to me that I shouldn’t be naive, that so many Washington politicians take our money.” The Qatari investor then allegedly stated, “Do you think [Michael] Flynn turned down our money?”

The retired Army lieutenant general resigned at the president’s request early last year after he lied about apparent contact he had with the Russians. He later pleaded guilty to lying to the FBI.

Cube and Kwatinetz are being represented by LA civil rights attorney Mark Geragos, who has represented numerous celebrities in the past — including Michael Jackson and Winona Ryder.

The $1.2 billion in damages that they are seeking are based on the BIG3’s projected revenue and player salaries. They initially filed their lawsuit last month alleging they were swindled out of millions of dollars by the Qataris, but it didn’t offer any details about Bannon or Flynn.

In the suit, Cube and Kwatinetz claimed that the investors set up a company in Delaware, called Sport Trinity LLC, which they used as a front.

The investment group responded to the bribery allegations in a statement to the Daily Mail on Wednesday, saying: “Simply put, the statements in Mr. Kwatinetz’s declaration are pure Hollywood fiction. Mr. Kwatinetz is engaging in a xenophobic PR smear campaign against Sport Trinity, the largest investor in BIG3 basketball, to cover up his own mismanagement and erratic behavior with respect to the league. Mr. Kwatinetz’s commercial dispute with Sport Trinity is meritless.”