New Delhi (CNN) India's Supreme Court on Saturday granted Hindus permission to build a temple at the centuries-old Ayodhya holy site, ending one of the country's most politically charged land disputes.

The 2.77 acres, previously claimed by both Hindus and Muslims, was the site of a 16th-century mosque demolished by right-wing mobs in 1992 in Ayodhya, a town in the state of Uttar Pradesh.

Security personnel stand guard on a street in Ayodhya on November 7, 2019, ahead of a Supreme Court verdict on the future of the site of the 16th-century Babri mosque.

But in a unanimous decision, India's top court ruled Saturday that a Hindu temple to the god Ram could be constructed at the site, while giving Muslim representatives a separate 5 acres of land in the town.

To settle the ownership claim, the Supreme Court was asked to consider ancient texts, a 500-year-old diary written by a Mughal emperor, travelogues from medieval merchants, as well as colonial-era surveys and archeological records.

The destruction of the Babri Masjid mosque by Hindu extremists in 1992 sparked some of the worst violence seen in India since independence, with more than 2,000 people killed in nationwide rioting. Dozens of temples and mosques were also targeted in a series of revenge attacks by Hindu and Muslim mobs.

Since then there have been calls to build a Hindu temple on the contested site, a demand that has long animated Hindu hardliners -- and worried Indian liberals, who fear outbursts of sectarian violence. Such fears have been fanned by a spate of high-profile lynchings of minorities in recent years.

A model of the Ram temple during the 'Dharam Sabha' Hindu congregation held to call for the construction of a grand temple of Lord Rama, in Ayodhya on November 25, 2018.

In an address to the nation on Saturday, India's Prime Minister Narendra Modi said the court's decision "has brought a new dawn" for the nation.

"The dispute may have affected generations," Modi said. "But after this verdict, we need to resolve that a new generation, with a new start will join in the creation of a new India. Let us begin afresh and establish a new India."

Modi added that the country should now work towards its future.

"There are many challenges in front of India, many aims and many goals," he said. "Indians together can achieve these aims together and reach new goals together."

Heavy security

Security has been beefed up across the region, especially in districts close to Ayodhya, and police officials have appealed for calm. Social media is being monitored for misinformation that could incite violence.

In the months leading up to the ruling, authorities placed emergency restrictions in Ayodhya, banning public gatherings of four or more people.

Over the past week, senior lawmakers and various religious and activist groups have appealed for calm and peace.

There was also pressure to deliver a ruling as Chief Justice Ranjan Gogoi is set to retire on November 17, and the case would have had to reset if a verdict was not given. The constitutional bench of the Supreme Court set up a marathon of daily hearings for 40 days before concluding the case in October.

Activists belonging to 'People for Peace and Justice' stage a candle light vigil urging people belonging to all religious communities to maintain peace and harmony regardless of the outcome of the Supreme Court verdict on Ayodhya.

What's the story?

The Babri Masjid was built on a disputed site in Ayodhya in the 16th century and the town has been a religious flashpoint for more than 400 years.

Hindus believe it is where Lord Rama, one of the most revered deities in Hinduism, was born. Muslims claim the land because the mosque was built there in 1528.

But many Hindus believe the Babri Masjid was built on the ruins of a Hindu temple, which was allegedly destroyed by Babar, the first Mughal emperor of South Asia.

Hindu and Muslim communities have lodged legal complaints and suits for decades.

While there are 14 petitions currently before the Supreme Court, three -- one Muslim and two Hindu -- were the main focus of the case.

They were the Muslim Sunni Waqf Board, the Nirmohi Akhara -- a group of Hindu ascetics who are devotees of Lord Ram, and Ram Lalla Virajman -- the child deity of Lord Ram. Under law, a Hindu deity is considered a "juristic person" with the right to sue and be sued.

In 2002, the Allahabad High Court began hearing a group of lawsuits filed by a number of Hindu and Muslim parties. In 2010, the Allahabad High Court ruled that the 2.77-acre land in Ayodhya should be divided equally among the three parties: the Sunni Waqf Board, the Nirmohi Akhara and Ram Lalla Virajman.

But none of the parties were satisfied with the verdict. They filed an appeal in the Supreme Court in 2010.

Indian Muslim supporters and activists take part in a protest to mark the 26th anniversary of the demolition of the 16th century Babri Masjid.

The arguments

The Sunni Waqf Board, an elected legal body that oversees Sunni Islamic properties endowed for religious or charitable purposes, argued that there is no proof that a temple was ever destroyed to build the mosque. The board wanted restoration of the status quo as of 1992, where they had control over a portion of the land.

Following Saturday's ruling, the lawyer for the Sunni Waqf Board told reporters that the body was "not satisfied with the judgment" but that they respect the Supreme Court's decision.

"We appeal to the nation to observe restraint and peace and that the entire country should remain peaceful and there should be no protest," Zafaryab Jilani added.

The group of Hindu monks called Nirmohi Akhara, whose name translates to "Group Without Attachment," claimed the land in its entirety and asked for the right to build a temple there.

The Ram Lalla Virajman claimed that the deity of Lord Ram had jurisdictional rights and as such its rights could not be divided and the entire piece of land should be handed over to the deity.

For decades, Hindus and Muslims have fought over the right to pray on the site. Protests have been traced to as far back as the late 1800's.

After India's independence from British colonial rule in 1947, multiple lawsuits claiming ownership and the right to pray were filed in Uttar Pradesh court. The cases finally made their way to the Allahabad High Court in 2002 and to the Supreme Court in 2010.

Vishnu Shankar Jain -- a lawyer for the Hindu Mahasabha, one of the litigants in the case -- told CNN the group were "hoping for a little more" from the judgment on Saturday, adding that they had hoped the Muslim parties would not "be given any land outside the acquired area."

"But ... we are very satisfied with the judgement passed by the Supreme Court," Jain added.

Ancient texts examined as proof

Indian Hindu protesters hold leaflets with the picture of Lord Ram outside the Indian Supreme Court in New Delhi on January 10, 2019.

Exhaustive and complicated, the case became an archeological dispute as well as a religious and political one.

The Archaeological Survey of India has submitted reports of digs in a quest to establish the veracity of the claim that the land was the birthplace of Lord Ram.

The Hindu counsel argued that there is a structure beneath the demolished mosque and that excavated materials suggested it was a temple.

Lawyers for the Muslim parties said there was no conclusive proof of a structure.

Documents presented in court included ancient texts that purportedly have descriptions of the site. They included travelogues of an English merchant in 1611, Jesuit missionary in 1740-1770, and ancient HIndu religious texts such as the Skanda Purana -- a text that contains over 18,000 verses, which provides a description of Ayodhya as a holy city and pilgrimages to the site.