Indian Prime Minister Narendra Modi has inaugurated a grand temple to Hindu god Ram in the flashpoint city of Ayodhya.
He said it heralded "a new era" for India - the temple replaces a 16th-Century mosque torn down by Hindu mobs in 1992, sparking riots in which nearly 2,000 people died.
Top film stars and cricketers were among guests at the event in Ayodhya.
But some Hindu seers and most of the opposition boycotted it, saying Mr Modi was using it for political gain.
General elections are due in India in the next few months and Mr Modi's political rivals say the governing Bharatiya Janata Party (BJP) will be seeking votes in the temple's name in a country where 80% of the population is Hindu.
Critics have also accused the government of exploiting a religious celebration in a country which - according to its constitution - is secular. For Muslims, India's biggest minority, the event evoked fear and painful memories, members of the community in Ayodhya told the BBC in the run-up to Monday's ceremony.
Televised live, it showed Mr Modi performing religious rituals inside the temple's sanctum along with priests and Mohan Bhagwat, head of the Rashtriya Swayamsevak Sangh (RSS) - the ideological fountainhead of Hindu nationalist parties.
"Today's date will go down in history," Mr Modi said after the event. "After years of struggle and countless sacrifices, Lord Ram has arrived [home]. I want to congratulate every citizen of the country on this historic occasion."
The temple has been constructed at a cost of $217m (£170m), funded from private donations. Only the ground floor was opened - the rest is expected to be completed by the end of the year. The construction work is part of a revamp for the city, estimated to cost more than $3bn.
The building of the Ram temple in Ayodhya fulfils a decades-long Hindu nationalist pledge. Many Hindus believe the Babri mosque was built by Muslim invaders on the ruins of a temple where the Hindu god was born. The movement to build the temple helped propel the BJP into political prominence in the 1990s.
There was a festive atmosphere as tens of thousands of chanting Hindu devotees waved flags and beat drums - military helicopters showered flower petals on the temple. Saffron flags with pictures of Lord Ram line streets in the city festooned with marigolds, as do banners with the faces of Mr Modi and Uttar Pradesh Chief Minister Yogi Adityanath.
Some of India's biggest celebrities, including Bollywood star Amitabh Bachchan and cricketer Sachin Tendulkar, attended.
In many other northern cities Hindus lit lamps, and saffron flags carrying images of Ram are fluttering on rooftops, including in several parts of Delhi. Cinemas screened the event, and big screens relayed pictures from Ayodhya to town squares and residential neighbourhoods.
The ceremony, called Pran Pratishtha, which loosely translates from Sanskrit into "establishment of life force", lasted about an hour. Hindus believe that chanting mantras and performing rituals around a fire will infuse sacred life in an idol or a photograph of a deity.
Several domestic TV stations built huge sets by the side of the river Saryu, a tributary of the Ganges, just behind the temple, and provided wall-to-wall coverage of the event, some proclaiming the moment of consecration as the start of "Ram Rajya" (Lord Ram's rule) in India.