Mr Modi, 63, was administered the oath of secrecy and office by President Pranab Mukherjee, an impressive function held in the forecourts of Rashtrapati Bhawan this evening.
He was elected the head of the BJP parliamentary party on May 20. As he entered Parliament House to attend the party meet on Tuesday, Mr Modi had knelt and touched his forehead to the ground in a freeze-frame moment that will undoubtedly become an iconic photo is years to come.
"It is proof of the strength of our constitution that a man from a poor family is standing here today," said Mr Modi, who sold tea on a railway platform as a child. "This government (will be) one which thinks of the poor, which listens to the poor, a government which lives for the people," he promised.
That boy who sold tea was, in many ways, the mascot of Mr Modi's powerful pitch for the post of PM.
The BJP announced in September last year that the Gujarat Chief Minister would be its candidate for prime minister. It did so despite stiff opposition from party heavyweight LK Advani. It was Mr Advani who proposed Mr Modi's name for Prime Minister. The party's 282 MPs endorsed this as did the BJP's allies in the National Democratic Alliance or NDA.
On Wednesday he resigned as Gujarat Chief Minister, an assignment he has held since 2001, winning election after assembly election. After he registered a third successive and very convincing win in December 2012 it became clear that Narendra Modi's aspiration to step out of Gujarat could not be ignored.
In the days that followed he lunched with ambassadors of the European Union, which ended its decade-long boycott of the Gujarat Chief Minster saying, "We are now in a new phase." A year later came a visit to Gujarat by US ambassador to India, Nancy Powell, ending her country's boycott of diplomatic engagement with Mr Modi after the 2002 communal riots in Gujarat.
Critics have accused Mr Modi of not doing enough to stem communal violence in his state that year. Some even accused him of complicity, but that has never been proved in inquiries and an Ahmedabad court recently accepted a clean chit given to him by a special investigation team appointed by the Supreme Court.
Their investment proved canny. The Modi-led NDA, now a juggernaut on 29 parties, steamrolled all opposition, reducing main rival Congress, which ruled for the last decade, to a mere 44 seats in the Lok Sabha. The NDA has won 336 seats - the BJP on its own has won 282, enough for a clear majority.
Many have credited Mr Modi's well-crafted, high-energy campaign over nine months for the BJP's stunning victory. He also made some key decisions that paid rich dividend - like handing the charge of Uttar Prdaesh, a crucial state that sends 80 MPs to Parliament, to his close aide Amit Shah. Mr Shah delivered. The BJP and its allies have won 73 seats in the state.
Officials in Mr Modi's government and local business leaders in Gujarat paint the picture of a man with a phenomenal memory, great attention to detail, unflagging energy and a flair for publicity. People who have met him say nothing escapes him. But they also describe him as a man with a vindictive streak, capable of holding grudges for years and intolerant of dissent.
Narendra Modi was born to lower middle-class parents in northern Gujarat on September 17, 1950. He holds a Master's degree in political science.
Mr Modi joined and rose through the ranks of the Rashtriya Swayamsevak Sangh, the ideological parent of the BJP, early in life.
A stocky, bespectacled man with a trimmed white beard, the Gujarat Chief Minister is known for his ascetic lifestyle and enthusiasm for yoga. He rises early and has for years read news on the Internet. He uses social media very effectively, tweeting extensively and has more than 3.6 million followers on Twitter.
He married at a very young age, but the couple separated soon and have lived apart for over 40 years. Mr Modi publicly acknowledged his wife, Jashodaben, a retired school teacher, for the first time during this election when he wrote her name in the column for spouse.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.