Modi becomes Indian Prime Minister
Mr Modi's inauguration is the first to which India invited leaders from across South Asia. Heads of government from Pakistan, Sri Lanka, Mauritius, Maldives, Nepal and Afghanistan attended, and Bangladesh was represented by the speaker of its Parliament.
But most eyes remained on Pakistani Prime Minister Nawaz Sharif, whose visit could signal a thaw in relations between the often hostile neighbours.
Indian President Pranab Mukherjee administered the oath to Mr Modi and his Cabinet as thousands of guests, including politicians, business leaders and movie stars, watched. Outgoing Prime Minister Manmohan Singh was seated next to Mr Sharif.
Analysts said Mr Sharif's presence signalled an easing of tensions between the nuclear-armed neighbours. Pakistan and India have fought three wars since their independence from Britain in 1947.
Mr Modi and Mr Sharif are to hold formal talks on Tuesday.
Mr Sharif called his visit "a chance to reach out to each other" and "a great opportunity," in an interview with NDTV news channel.
"Both governments have a strong mandate. This could help in turning a new page in our relations," he added.
Mr Modi and his Hindu nationalist Bharatiya Janata Party won 282 seats in the 543-member lower house of Parliament, well ahead of the 272 it needed for a majority. Analysts say that gives Mr Modi a free hand in choosing his priorities without being constrained by coalition partners.
Mr Modi promised during the campaign that his goals would be good governance, job creation and fighting corruption, a message that struck a chord with voters.
Economic growth has plummeted in the past few years as inflation has risen and exports have declined. The former Congress party-run government became paralysed by corruption scandals, internal feuding and an inability to deal with the stumbling economy and deep-rooted problems with poverty, infrastructure and education.
In an early indication that he plans to streamline the government, Mr Modi's office said several ministries, especially those dealing with infrastructure, will be combined to make them more efficient and to reduce red tape.