CANBERRA, Australia — Australian mining magnate turned lawmaker Clive Palmer has apologized to China over an extraordinary tirade on national television in which he called the Chinese “bastards” and “mongrels” and accused Beijing of trying to take over Australia.

Following the volatile multimillionaire’s Aug. 18 outburst on Australian Broadcasting Corp.’s “Q & A” program, government ministers accused him of threatening Australia’s relationship with its biggest trading partner and distanced themselves from his views. Palmer, meanwhile, largely avoided commenting on the issue.

But Palmer, who was elected to Parliament last September from his own Palmer United Party, released on Tuesday the text of an apology letter to China’s ambassador to Australia, Ma Zhaoxu.

“I most sincerely apologize for any insult to Chinese people caused by any of the language I used,” Palmer wrote in the letter, dated Aug. 25.

“In keeping an open mind, I now come to the realization that what I said on Q&A was an insult to Chinese people everywhere and I wish to assure them they have my most genuine and sincere apology,” the letter said.

The tirade began when Palmer, 60, was questioned about a legal dispute between his mining company Mineralogy and its Chinese state-owned partner, CITIC Pacific Mining. CITIC alleged in court that Palmer syphoned 12 million Australian dollars ($11 million) to fund his party’s election campaign.

Palmer, whose party forms a powerful voting bloc in the Senate with the support of four senators, said his companies were owed “about AU$500 million by the communist Chinese government that doesn’t want to pay.” He said he was countersuing.

“I don’t mind standing up against the Chinese bastards and stopping them from doing it,” Palmer said.

He said his companies already had three federal and supreme court judgments “against these Chinese mongrels.”

“I’m saying this because they’re communist, they shoot their own people, they haven’t got a justice system and they want to take over this country, and we’re not going to let them do it,” Palmer said on the program.

He later explained on his Twitter account that his comments were “not intended to refer to Chinese people but to (a) Chinese company which is taking Australian resources & not paying.”

Following the tirade, the Chinese Embassy issued a statement describing Palmer’s comments as “absurd,” ”irresponsible” and “full of ignorance and prejudice.”

But Palmer United Party Senator Jacqi Lambie controversially backed her leader’s words.

Lambie urged Australia to invest in missiles to prevent Australian grandchildren from becoming “slaves” to a “Chinese communist invasion.”

The embassy said it received Palmer’s letter of apology on Tuesday and issued another statement.

“Palmer’s insulting remarks on China could by no means represent the Australian government and parliament, let alone its people,” Tuesday’s statement said. “Ambassador Ma stressed that the Chinese people are never to be insulted. Any remarks attacking or slandering China would not gain support and were doomed to failure.”

“The healthy and stable development of China-Australia relations is in the fundamental interests of the two countries and peoples, and cannot be overturned by any individual,” the statement added.