Randy Credico leaves with his dog Bianca from the U.S. District Court, September 7, 2018 in Washington, DC.

President Donald Trump's longtime advisor and confidante Roger Stone allegedly told an associate to "do a 'Frank Pentangeli'" and later threatened to take away the man's dog. The warnings came in messages obtained by the special counsel and revealed on Friday in an unsealed indictment alleging witness tampering and other charges.

The man on the receiving end of those messages was Randy Credico, a radio personality who Mueller said served as the intermediary between Stone and WikiLeaks, the anti-secrecy website that the United States has said was used by the Kremlin to disseminate documents stolen from Trump's 2016 rival Hillary Clinton.

The indictment says the threatening messages to Credico came after Stone told the House Intelligence Committee in September 2017 that he and Credico had not exchanged any texts or emails. In fact, the two had texted and emailed frequently during the course of the 2016 presidential campaign, including about WikiLeaks, special counsel Robert Mueller alleges.

After learning three months later that Credico had been subpoenaed to testify before the committee, Stone allegedly urged him to "do a 'Frank Pentangeli'" — a reference to the mobster in "The Godfather" — in order to avoid revealing that Stone had perjured himself.

In "The Godfather: Part II," which Mueller notes Credico and Stone had discussed, Pentangeli lies to a congressional committee to avoid incriminating mob leader Michael Corleone.

In response to Stone's plea, Credico urged Stone to "amend your testimony before I testify on the 15th," the indictment said.

Stone allegedly responded: "If you testify you're a fool. Because of tromp I could never get away with a certain [sic] my Fifth Amendment rights but you can. I guarantee you you are the one who gets indicted for perjury if you're stupid enough to testify."

Later that month, Credico, who is referred to as Person 2 in the indictment, texted Stone to "be honest" with the FBI, according to the indictment.

Stone allegedly responded that he was not talking to the FBI and if Credico was smart "you won't either."

Credico told the committee that month that he would assert his 5th Amendment rights and not testify. Credico has not been charged with any wrongdoing in connection with Mueller's probe. He declined to comment to CNBC on Friday.

The White House said Friday that the charges brought by the special counsel had nothing to do with the president. Stone's attorney vowed to vigorously contest the charges.