US President Donald Trump expected 10 million people to welcome him in India on his first state visit. It didn't happen, but everything else seems to have gone according to the script.
The optics of the trip were crucial both for him and Indian Prime Minister Narendra Modi.
Mr Trump wanted to show people in the US that he was hugely popular abroad and that he was capable of negotiating good deals out of a country he once described as the "king of tariffs".
On the other hand, the Indian PM desperately needed some good headlines after being under the spotlight due to his controversial decision to revoke Kashmir's autonomy and the ongoing protests against his new citizenship law.
In the end, both leaders had their wishes fulfilled despite not agreeing on a much talked-about trade agreement.
Looking beyond the song and dance and pleasantries, here are some of the key diplomatic takeaways.
The first day of the visit was all about optics - tens of thousands, if not ten million, lined up the streets to greet him on his way from the Ahmedabad airport to the Motera cricket stadium in Gujarat, the home state of Mr Modi.
At the stadium, he addressed more than 100,000 people. He evoked Bollywood, cricket and saints - good enough topics to get Indians interested.
It was a good speech - not just for the people in the stadium but also for his election campaign back home. The videos from the "Namaste (hello) Trump" event have already been used by his campaign.
And he also said some soothing words for Mr Modi. Tanvi Madan, senior fellow at the Brookings Institution, says the trip will help Mr Modi fight negative headlines.
"Mr Trump described him as a calm person, a great leader and somebody who works for his people. Mr Modi will take these compliments happily," she says.
These words matter - specially at a time when Mr Modi's leadership is being questioned after violent protests over the citizenship act killed at least 13 people in Delhi in recent days.
The deal that didn't happen
A trade deal was always going to be tough given the two countries were engaged in a bitter tariff war just last year. Mr Trump would have loved to sign a deal that would help bridge the US $25.2bn (£19.3bn) trade deficit with India.
But Ms Madan says it's not all doom and gloom.
"The visit will at least push India down the trade hit list of the Trump administration as negotiations continue for the trade deal," she says.
Ms Madan believes that the visit has been a success because "you can't expect a nuclear deal every time". She adds that Mr Trump is known to be unpredictable but he has "largely stayed with the script this time".
And it was important. There have been concerns that Delhi was losing bipartisan support in the US and it didn't have many "India champions" in the Trump administration.
Pratyush Rao, associate director at the Control Risks consultancy, says that all has not been well between the two countries in recent years.
"There has been a perception that India-US relations have been adrift for a while. There has been a lack in the ownership of the India file in the Trump administration," he adds.
And there can't be a better showcase than a presidential visit to give an impetus to the relationship.
Deals that happened
Mr Trump loves deals and he got a few to boast about when he lands in the US.
India is buying attack helicopters and other US military equipment worth $3bn. And another deal with Exxon Mobil will see India importing more Liquified Natural Gas (LNG) from the US. Both were easy giveaways for India.
"India needs energy security to feed its growth and it had been looking to diversify its petroleum import portfolio anyway, so this one fits in," Mr Rao adds.
India still imports a majority of its defence equipment and Russia owns more than 50% of the pie. Mr Rao says it doesn't harm India to diversify its defence portfolio as long as it can keep Moscow on its side.
Swipes at China
Mr Trump subtly criticised China without naming the country at least a couple of times.
He repeated Washington's doubts over the security of Chinese tech giant Huawei's 5G technology - without saying so explicitly.
"During our visit we discussed the importance of a secure 5G wireless network and the need for this emerging technology to be a tool for freedom, progress, prosperity, not to do anything with where it could be even conceived as a conduit for suppression and censorship," Mr Trump said.
Michael Kugelman, deputy director at the The Wilson Center, says the president's statement was not surprising.
"China really looms large in this relationship. You can talk about shared values, the Modi-Trump friendship, but it's really the converging interests that bring the two countries together," he says. "Both countries see China as a concern."
And Mr Trump again called the region Indo-Pacific instead of Asia Pacific as China would prefer.
He also mentioned "the quad" and the Blue Dot project. The project, led and launched by Washington, is meant to bring the governments and the private sectors of the US, Australia and Japan together. It won't be complete without India's cooperation.
"The quad has ebbed and flowed. But over the last years, there has been efforts to bring it back in the limelight and Mr Trump's mention of the project in India is a significant step to revive it," Mr Kugelman adds.
The risk for India involves antagonising China, which sees the quad as a counter to its own Belt and Road initiative. But Mr Kugelman says such apprehensions seems to have been cast aside for now.
Kashmir and Pakistan
Mentioning Pakistan and Kashmir is a line foreign leaders try not to cross when visiting India - but Mr Trump did. He said he had excellent relations with Pakistani PM Imran Khan and once again offered to mediate in the Kashmir issue.
Mr Modi can live with that, says Mr Rao.
"The Indian side will see these as minor digressions, specially given the fact that Mr Trump was so effusive in praising Mr Modi."
Mr Trump also refused to comment on the ongoing protests and religious intolerance. In fact, he went a step further than expected. He praised Mr Modi's efforts in giving religious freedom to every community in India.
That very much offset any discomfort Indians may have had after the mention of Pakistan and Kashmir.
What lies ahead
The unpredictability of the Trump administration is the biggest risk in the relationship.
And then there are other headwinds as well.
"The slowdown of the economy in India, growing social unrest and the expected global slowdown because of the coronavirus may cast shadows on the relationship," Ms Madan adds.
Japanese PM Shinzo Abe also pulled out all the stops to keep Mr Trump on his side, but that didn't stop the US president from berating Japan.
For now, however, India has done well.
Mr Modi needs to keep Mr Trump on its side for strategic and security reasons - the grand welcome he accorded the US president showed how serious he is about the relationship.
But the immediate future of the relationship depends on the upcoming US presidential elections.
Mr Trump and Mr Modi's "bromance" was on full display in this visit and that has very much become the cornerstone of the relationship between the two countries.
India will find it easier to deal with a leader it has already invested in, hoping Mr Trump's unpredictable nature won't harm the relationship.
"Mr Trump wanted a big crowd and a larger-than-life spectacle and India gave him that," says Mr Rao. "Now let's see how long the impact of the spectacle lasts."