ISTANBUL (BLOOMBERG) - Seven months ago, Saudi Arabia's Crown Prince Mohammed Bin Salman seemed like the loneliest leader at the party.
Attending the Group of 20 summit in Argentina, he spent two days holed up in the Saudi residence in a posh neighbourhood in the capital, avoiding a firestorm over the murder of columnist and Saudi critic Jamal Khashoggi.
When he did emerge, he was lectured by the leaders of the UK, Canada and France. US President Donald Trump dodged a chat with him. A rare bright spot was Russian President Vladimir Putin, with whom he shared a firm handshake and smiles.
Fast forward to this year's G-20 summit in Osaka, Japan, and it is a somewhat different story.
He met with leaders including Mr Putin, British Prime Minister Theresa May, India's Narendra Modi and the Dutch Queen.
Perhaps most visibly, he had a chummy breakfast meeting with Mr Trump, who called him a friend and reformer who is bringing "revolution in a positive way".
Crown Prince Mohammed, who is often referred to as MBS, looked confident as he strode in to shake hands on Friday (June 28) with Japanese Prime Minister Shinzo Abe, ahead of a family photo where he scored pole position in the centre of the front row, in between Mr Trump and Mr Abe, waving and smiling broadly.
He sat next to Mr Abe at the start of the first plenary session and delivered a speech at the closing session.
Part of that is probably protocol. Saudi Arabia is hosting the next G-20 summit in late 2020. So MBS got some prominent treatment in Osaka.
But it also reflects the broader reality of Saudi Arabia's importance to many countries for its oil and its key role in Middle East security.
The message from the G-20 is that as time passes, some leaders at least are looking to move on from the Khashoggi affair.
"MBS emerged as a leader of stature - but the stature of Putin, feared rather than necessarily respected,'' said Mr Simon Henderson, a Persian Gulf expert at the Washington Institute for Near East Policy.
That status might be enough for now for Crown Prince Mohammed.
While he has projected an image of a young reformer, eager to open up Saudi Arabia's economy and give greater freedoms to women, the 33-year-old de facto leader has also presided over a crackdown on female activists and faced global criticism over the murder last year of Khashoggi by Saudi agents at the kingdom's consulate in Istanbul.
MBS has denied ordering the killing, although the United Nations has recommended probing his possible involvement.
He has also emerged as a central figure in Mr Trump's Mideast plans, especially the containment of Iran.
That's given him some protection despite anger in Congress from both Republicans and Democrats over Khashoggi's murder and MBS's actions backing a military alliance fighting in Yemen, where a long-running war has sparked a large humanitarian crisis.
Indeed, the G-20 came just a week after the US Senate voted to block arms sales to the kingdom.
Mr Trump's very public endorsement showed how the White House at least is willing to look past Khashoggi and Yemen in order to keep MBS onside in the pressure campaign against Iran.
Mr Trump made his first foreign trip as president to Saudi Arabia in 2017, promising hundreds of billions of dollars in weapons sales to the kingdom.
"We have a great relationship and that's very important," the President said on Saturday as he met Prince Mohammed.
"We're trying to do the best for our country," the Crown Prince responded, adding, "it's a long journey."
"We need to do more."
Saudi Arabia's status as an oil producer was on display at the G-20.
Crown Prince Mohammed agreed with Mr Putin to extend the Opec+ deal at current production levels for the rest of this year, all but making the outcome of an Opec meeting this week in Vienna a foregone conclusion.
Saudi Arabia and Russia ended years of animosity in 2016 to join forces to manage the global oil market in an effort to prop up prices.
At the same time, the kingdom under Prince Mohammed has pushed to diversify its oil-dependent economy and encourage investment.
It recently removed a cap on ownership of publicly traded companies for foreign strategic investors, paving the way for international investors to take controlling stakes in sectors from banking to petrochemicals.
Saudi Arabia has also approved a programme that offers permanent residency for some foreigners to attract investments, and is seeking private sector investment to turn an area about the size of Belgium on its Red Sea coast into a global tourism destination.
But to attract a broader array of foreign investment in the coming years, including for his big infrastructure projects, Crown Prince Mohammed needs to move away from the image of a leader in the ilk of Mr Putin.
While he was perhaps less shunned in Osaka than in Argentina, western leaders hardly went out of their way to engage him. Mrs May brought up Yemen, Iran and Khashoggi in her 20-minute meeting with him.
Aligning himself so closely with Mr Trump may not be a sustainable long-term strategy for the Crown Prince, either.
"Winning Trump's evident endorsement is not a plus across much of the world," according to Mr Henderson.
An official readout of the Crown Prince's closing remarks to the G-20 suggests the need for him to not only diversify his economy, but diversify his friends.
It contained references to MBS's comments on the importance of international cooperation and coordination given the "complex and interrelated challenges facing our world today".
It finished with the Crown Prince expressing his hope that G-20 leaders will allow him to host them next year in Riyadh.