(CNN) An attempt at Twitter diplomacy went awry on Thursday when the Japanese Prime Minister's account accidentally quoted a tweet from the President of the United States bashing a sitting senator.

In the now-deleted tweet, Japanese Prime Minister Shinzo Abe wrote, "I too look forward to having fruitful talks with my great friend President @realdDonaldTrump as always." But rather than quoting Trump's tweet about their discussions on North Korea and trade, Abe mistakenly included one attacking Republican Sen. Jeff Flake.

"How could Jeff Flake, who is setting record low polling numbers in Arizona and was therefore humiliatingly forced out of his own Senate seat without even a fight (and who doesn't have a clue), think about running for office, even a lower one, again? Let's face it, he's a Flake!," Trump wrote.

When asked about Trump's tweet, Flake told CNN he had "no reaction."

The mistaken tweet was quickly deleted. Abe's account replied with the same message to the correct Trump message at the same time the erroneous quote tweet was posted. The account also retweeted Trump's message about their bilateral talks, which read: "Looking forward to seeing my friend Prime Minister @AbeShinzo of Japan at noon. Will be discussing North Korea and Trade."

Read More