Facebook blamed a technical glitch Saturday after the site mistranslated Burmese-to-English posts about Chinese President Xi Jinping during his visit to Myanmar.

Xi’s name appeared in the English translation as “Mr. S---hole,” according to Agence France-Presse.

“We fixed the technical issue that caused incorrect translations from Burmese to English on Facebook,” a spokesman for the social networking giant said, according to AFP. “This should not have happened and we are taking steps to ensure it doesn’t happen again. We sincerely apologize for the offense it has caused.”

BUTTIGIEG SAYS FACEBOOK'S ZUCKERBERG HAS TOO MUCH POWER

Facebook said its translation system did not include an entry for “Xi Jinping,” so by default the system looked for words containing similar syllables. The errant translation came about because the system searched through terms beginning with “xi” and “shi,” AFP reported.

One headline resulting from the glitch read, “Dinner honors President S---hole,” according to reports.

One of the pages where the incorrect translation appeared was on the Facebook page of Myanmar’s civilian leader Aung San Suu Kyi, who won the Nobel Peace Prize in 1991.

Myanmar State Counselor Aung San Suu Kyi, right, greets Chinese President Xi Jinping at president house in Naypyitaw, Myanmar, Saturday, Jan. 18, 2020. (Associated Press)

The error was spotted during the second day of Xi’s visit to Myanmar, in which he and Suu Kyi signed a series of deals through which China has agreed to aid Myanmar on infrastructure projects, The Guardian reported.

The same error did not appear in Google’s translation of Suu Kyi’s page, according to the outlet.

GRISHAM ON TOP DEMS KNOCKING CHINA TRADE DEAL: 'THEY HATE TRUMP MORE THAN THEY LOVE THIS COUNTRY'

China is the No. 2 market, after the United States, from which Facebook draws revenue. The company has begun setting up a new engineering team in Singapore tasked with helping Chinese customers work around the government’s internet restrictions, known as the “great firewall,” Reuters reported.

Reactions from Xi or the Chinese government to the Facebook error were not immediately known.

Xi's visit was also intended to mark the 70th anniversary of the establishment of diplomatic ties between China and Myanmar.

The Associated Press contributed to this report.