Tony Abbott, the Australian prime minister, has agreed a historic economic pact with his Japanese counterpart Shinzo Abe – but in doing so admitted to being hungover live on TV, angered the Chinese government and exposed his crotch for a photo opportunity.

In a week in which the leader clearly decided the ends justify the means, Mr Abbott started off by hailing Japan’s controversial attempts to build up a more robust military in spite of its pacifist constitution.

During a parliamentary address, which was attended by Mr Abe, the prime minister went on to praise the bravery of a group of Japanese submariners who attacked Australia during a 1942 raid on Sydney harbour.

Download the new Independent Premium app Sharing the full story, not just the headlines

He said: “We admired the skill and the sense of honour that they brought to their task although we disagreed with what they did. Perhaps we grasped, even then, that with a change of heart the fiercest of opponents could be the best of friends.”

Part of the agreement signed this week will see an increase in military transfers between the two countries, in what Mr Abe said was the launching of a “special relationship” on matters like defence and the putting aside of any lingering enmity from the Second World War.

Unsurprisingly, Mr Abbott’s comments were not to the liking of the Chinese government. The official state news agency Xinhua published an op-ed saying the statement was “insensible” towards victims of the Japanese military.

It said: “He (Abbott) wasn't aware that the Japanese troops possessed other 'skills', skills to loot, to rape, to torture and to kill. All these had been committed under the name of honour almost 70 years ago.”

Pictures from Mr Abe’s three-day tour of Australia showed him and Mr Abbott laughing over Western Australian wine in the Great Hall of Canberra’s Parliament House.

And in a TV interview the next morning, the Australian prime minister was chided over appearing visibly “worse for wear” after “getting on the sake”.

Mr Abbott said he “accepted that”, though adding that while it was a “very convivial dinner” it was a “responsible” one too.

On Mr Abe’s last day in Australia on Wednesday he was given a guided tour of a Japanese-Australian mining venture in Western Australia’s Pilbara region – naturally by Mr Abbott himself.

And after presenting his newfound friend with a parting gift of a pair of RM Williams boots (up there, news.com.au reported, with his embarrassingly inappropriate gift of a surfboard to Barack Obama), Mr Abbott encourage him to pose atop a giant hauling truck tyre.

The image was promptly shared via Mr Abbott’s official social media accounts – and users were quick to point out that, without context, the results were less than flattering.

One user tweeted: “And here we have Tony Abbot showing the Japanese PM how to cock his leg and p*** on Australia.”

Another, presumably referring to the shiny new boots, wrote: “@TonyAbbottMHR maybe you can remember to take em out of your mouth before you speak next time.”

Emma Belfield tweeted simply: “Good grief, Tone.”

The picture has since been creatively photoshopped by a number of Twitter users – and appears well on its way to becoming a meme in its own right.

The agreement signed this week will see Australians enjoying a reduced price on a range of goods from electronics to cars – but at what cost to Mr Abbott’s reputation?