Indian Prime Minister Narendra Modi appealed to an emboldened opposition for "consensus" Monday, as parliament opened following an election setback that forced him into a coalition government for the first time in a decade.

Expected in the first session, which will run until July 3, is a preview of Modi's plans for his third term and the likely formal appointment of Rahul Gandhi as leader of the opposition -- a post vacant since 2014.

Modi's first two terms in office followed landslide wins for his right-wing Bharatiya Janata Party (BJP), allowing his government to drive laws through parliament with only cursory debate.

But now analysts expect the 73-year-old Modi to moderate his Hindu-nationalist agenda to assuage his coalition partners, focusing more on infrastructure, social welfare and economic reforms.

"To run the country, a consensus is of utmost importance", Modi said in a speech shortly before entering parliament, calling on the opposition to play a constructive role.

"People expect their representatives to debate and discuss issues which are important to the country... they don't expect disturbances or hindrances in the parliamentary proceedings," he said.

"People want substance, not slogans."

Modi led lawmakers in taking the oath -- as his cheering supporters thumped their desks in support, and opposition members waved the constitution in protest.

He said he was "proud to serve" India.

- 'Set to spar' -

Minister of Parliamentary Affairs Kiren Rijiju on Monday called for a "peaceful and productive" session, but Indian media said they expected lively debate with a far stronger opposition.

"All set to spar," one headline in the Hindustan Times read Monday.

"Resurgent opposition set to push government," said the Indian Express front page.

Rahul Gandhi, 54, defied analyst expectations to help his Congress party nearly double its parliamentary numbers, its best result since Modi was swept to power a decade ago.

Gandhi is the scion of a dynasty that dominated Indian politics for decades and is the son, grandson and great-grandson of former prime ministers, beginning with independence leader Jawaharlal Nehru.

Parliamentary regulations require the opposition leader to come from a party that commands at least 10 percent of the lawmakers in the 543-seat lower house.

The post has been vacant for 10 years because two dismal election results for Congress -- once India's dominant party -- left it short of that threshold.

- Lawmakers elected behind bars -

Newly elected lawmakers will take their oaths over the first two days.

Many will be watching if two lawmakers elected from behind bars, bitter opponents of Modi, will be allowed to join.

One is the Sikh separatist Amritpal Singh, a firebrand preacher arrested last year after a month-long police manhunt in Punjab state.

The other is Sheikh Abdul Rashid, a former state legislator in Indian-administered Kashmir.

It is unclear if either will be granted bail to attend the ceremony in person.

Modi's decade as premier has seen him cultivate an image as an aggressive champion of the country's majority Hindu faith, worrying minorities including India's 200-million-plus Muslim community.

But his BJP won only 240 seats in this year's poll, 32 short of a majority in the lower house -- its worst showing in a decade.

It has left the BJP reliant on a motley assortment of minor parties to govern.

Modi has kept key posts unchanged in this government and the cabinet remains dominated by the BJP.

That includes BJP loyalists Rajnath Singh, Amit Shah, Nitin Gadkari, Nirmala Sitharaman and S. Jaishankar -- the defence, interior, transport, finance and foreign ministers, respectively -- staying on in their jobs.

But out of his 71-member government, 11 posts went to coalition allies who extracted them in exchange for their support -- including five in the top 30 cabinet posts.

Many will also be eying the election of the speaker, a powerful post overseeing the running of the lower house, with lawmakers slated to vote on Wednesday.

Coalition allies covet the post, but others suggest Modi will put forward a candidate from the BJP.

For the first time, lawmakers took the oath in India's new parliament building, a grand hexagonal legislature inaugurated last year.

The building was seen as the centrepiece of a remodelling of the heart of New Delhi by Modi aimed at ridding the Indian capital of the vestiges of British colonial rule.

Opposition parties boycotted the opening.