The Chinese have taunted U.K. Prime Minister Boris Johnson, comparing his pledge to uphold democracy in Hong Kong with his promise to break international law on the Northern Ireland Protocol.

Johnson last week marked the 25th anniversary of the handover of the former British colony of Hong Kong to China with a tweet: “25 years ago we made a promise to the people of Hong Kong. We intend to keep it.”

The Chinese Embassy in Ireland screen grabbed the tweet and responded, “Two years ago we made a promise to the Northern Ireland Protocol. We are determined to break it.”

The exchange between the two countries prompted an immediate backlash by Johnson critics, stressing the U.K. no longer had authority to lecture other countries on international treaties.

The Irish Times reported a response from Gavin Barwell, the former Downing Street chief of staff to Johnson’s predecessor Theresa May. Barwell tweeted, “This is why going back on our word is such a bad idea: it doesn’t just damage our relations with our friends, it was always going to be quoted back at us when we accuse others of not honoring their commitments. Not too late to stop this act of self-harm.”

Edwin Hayward, the author who wrote Slaying Brexit Unicorns, a book debunking pro-Brexit myths said, “Boris Johnson has dragged the U.K.’s reputation so deep into the mud, an official Chinese Embassy account feels perfectly comfortable openly trolling him.”

Chris Patton, the last governor of Hong Kong, told Sky News that the British government threat to break an international agreement over the Northern Ireland Protocol was undermining its moral authority.

He said, “If and when we do breach international agreements, it will come back and hit us like a boomerang.”

Johnson’s government has already started pushing a bill through the Commons to override the peace-keeping Protocol he signed up to in 2019.  It is due for further debates before moving on to the House of Lords where the Tory government doesn’t have a majority and the proposed measures can be delayed for up to a year by concerned peers.

Johnson prompted the taunting Chinese Ireland Embassy tweet when he said last week that Britain would do all it could to hold Beijing to its commitments on democratic rights made in 1997. He said China had failed to comply with its commitment to respect a “One Country, Two Systems” arrangement agreed under the deal that ended British colonial rule.

Meanwhile, Irish Foreign Affairs Minister Simon Coveney told RTE on Sunday that the British government had not engaged in serious negotiations on the Protocol since February, yet it claimed to have exhausted all attempts to reach a solution.

He was speaking after he wrote a joint op-ed article for The Observer newspaper with German Foreign Minister Annalena Baerbock.  Both warned there was no legal or political justification for plans to override the Protocol.