The UK has a new prime minister, and while Boris Johnson's biggest challenge is delivering Brexit, he will soon find plenty more on his agenda.

World leaders will be eagerly studying Mr Johnson's previous opinions and positions to try to decide how he might act as prime minister.

Luckily, his two years as foreign secretary, decades of newspaper and magazine columns, and a wealth of interviews will provide them with plenty of material.

US: Trump's 'many, many good qualities'

The special relationship just got more special. Donald Trump and Boris Johnson are - if not best buddies, then keen admirers of one another.

It hasn't always been the case. In 2015, when Mr Trump was running for president, he falsely stated that parts of London were no-go areas. In response, Mr Johnson - then mayor of London - accused him of a "quite stupefying ignorance that makes him frankly unfit to hold the office of president of the United States".

It's a position Mr Johnson himself once joked he could run for, as he was born in New York.

Image copyright AFP/Getty Images Image caption Expect more of this

His tone since Mr Trump became president has been much warmer (for the most part) and last month Mr Johnson suggested Britain could learn a lot from the US president.

"Actually, he has many, many good qualities," Mr Johnson said. "This is a guy who, when all is said and done, has got the US economy motoring at about 3.6% growth." (In fact, it is currently 3.1%).

"He's cut regulation, cut taxes in a way that has driven growth. My point is that... we Conservatives have failed, for too long, to talk up the agenda of free market economics."

Mr Trump has said he thinks Mr Johnson will do an "excellent" job as prime minister. The friendly tone bodes well for any hopes Mr Johnson has of striking a post-Brexit trade deal with the US.

Turkey: Creative rhyming

We're now in a situation where the leader of one country - Mr Johnson - has written a rude award-winning poem about the leader of another - Turkey's President Recep Tayyip Erdogan.

Mr Johnson's 2016 limerick - which included an obscene reference to a goat and a creative new word to rhyme with "Ankara" - won him £1,000. He and Mr Erdogan met months later, and the limerick was apparently not mentioned. Mr Johnson has also stated how much he likes his "very well-functioning Turkish washing machine".

Mr Johnson once appeared to express concern at the prospect of Turkey and its 80 million citizens joining the European Union. Before the EU referendum in June 2016, he indicated - in a letter signed with two other pro-Brexit figures - that anyone who did not want Turkey in the EU should vote to leave the bloc. But he did not go as far as saying that Turkey should not join the EU.

Mr Johnson has family ties to Turkey - his great-grandfather Ali Kemal was a former Turkish minister of the interior, who was killed by a mob. Elders in Mr Johnson's ancestral region have already vowed to "sacrifice many sheep in Boris' honour".

Russia: 'Oligarchs and cronies'

Image copyright Getty Images Image caption "I made the classic, classic mistake of thinking it was possible to have a 'reset' with Russia"

Last month, Mr Johnson said too much power in Russia had been placed in the hands of "oligarchs and cronies" and that Vladimir Putin's recent comment that liberalism was dead was "tremendous tripe".

But might we see moves by Mr Johnson to forge closer ties with the Kremlin as prime minister? Once bitten, twice shy, perhaps. He was the first British foreign minister to visit Russia in five years, but said after leaving his role that he had been too naive about what he could achieve.

"When I became foreign secretary I thought there was no objective reason why we should be quite so hostile to Russia," he said.

"Yes, there were lots of reasons to be suspicious, lots of reasons to be wary. But I thought it was possible - I made the classic, classic mistake of thinking it was possible to have a 'reset' with Russia."

Papua New Guinea: 'Cannibalism and chief-killing'

"For 10 years," he wrote in a newspaper column in 2006, "we in the Tory party have become used to Papua New Guinea-style orgies of cannibalism and chief-killing."

He said he was happy to "add Papua New Guinea to my global itinerary of apology", but has not yet visited.

"How far removed and ill-informed can Mr Johnson be from the reality of the situation in modern-day Papua New Guinea?" the country's high commissioner, Jean L Kekedo, said at the time.

India: 'Optimistic vision'

Mr Johnson has made all the right noises when it comes to charming a country with which it conducts more than $15bn ($18bn) of trade a year - a figure the UK hopes to increase after Brexit. When Prime Minister Narendra Modi won re-election in May, Mr Johnson was full of praise:

At a hustings in Bedfordshire last week, he indicated growing trade ties with India would be a priority. "Trade with China has gone up by about 45% in the last 10 years," the Hindustan Times reported him as saying. "In India, volumes have remained almost static. We need to do far more. India is a massive natural market for the UK."

DRC: 'Watermelon smiles'

Writing in the Daily Telegraph in 2002, before then-PM Tony Blair visited Democratic Republic of Congo, Mr Johnson said: "No doubt the AK47s will fall silent, and the pangas will stop their hacking of human flesh, and the tribal warriors will all break out in watermelon smiles to see the big white chief touch down in his big white British taxpayer-funded bird."

His comments, criticised as racist, drew outrage, and he apologised when he ran for mayor of London six years later.

Iran: Only diplomacy will work

Apart from Brexit, tension over Iran is probably the most pressing diplomatic issue sitting in Mr Johnson's in-tray, as our diplomatic correspondent points out.

A deal signed with Iran to restrict its nuclear activity is teetering. The US has reimposed sanctions; Iran is enriching more and more uranium; and the UK is sending more warships to the Gulf amid fears Iran may seize its tankers.

The new prime minister does not back an aggressive confrontation, an option Mr Trump has not ruled out. "If you say that going to war with Iran now represents a sensible option for us in the West, I just don't believe it is," he said at a leadership debate last week. "Diplomacy must be the best way forward.

"If you were to ask me... if I were to be prime minister now, would I be supporting military action against Iran, then the answer is no."

But he has indicated he is ready to reimpose sanctions on Iran if it continues to enrich uranium at a rate not permitted under the nuclear deal.

Saudi Arabia: 'Twisting and abusing religion'

Whoever is in the role of British prime minister has to perform a delicate balancing act when it comes to Saudi Arabia. It is one of the UK's closest allies, or at least one of its most important arms buyers. But Saudi Arabia is also accused of rights abuses and of possibly committing war crimes in its war in Yemen.

So what has Mr Johnson said about Saudi Arabia? As foreign secretary, he accused it (and Iran) of fighting proxy wars across the region, adding that there was not strong enough leadership in those countries. "There are politicians who are twisting and abusing religion and different strains of the same religion in order to further their own political objectives," he said.

Media playback is unsupported on your device Media caption Boris Johnson: "You have these proxy wars being fought the whole time"

Downing Street then said that this was only his personal view, and did not represent the government's position. But he has also appeared happy to deal with Riyadh: emails that emerged last month, seen by the Guardian and the Independent, showed Mr Johnson was "content" to sell bomb parts to Saudi Arabia that were likely to be deployed in Yemen.

China: Respect Hong Kong

His comments after recent protests in Hong Kong echoed those of the British government. He said he backed "every inch of the way" demonstrators who were angry about a new extradition law that would have seen people in Hong Kong sent to China's mainland.

But he also emphasised how important it was for Beijing to respect the "one country, two systems" approach to Hong Kong that granted it a degree of autonomy from the mainland after it stopped being a British colony.

Any Boris fans in China may want to follow his Weibo account - but bear in mind it hasn't been updated since October 2013.