The five judges are expected to announce their verdict in mid-November.
They heard 14 petitions challenging a 2010 lower court ruling that 1.12 hectares (2.77 acres) of disputed land be partitioned among Hindus and Muslims.
The destruction of the mosque in Ayodhya, a town in the northern state of Uttar Pradesh, in 1992 sparked massive Hindu-Muslim violence that left 2,000 people dead.
The judges started day-to-day proceedings in August after mediation proceedings failed to find a compromise between the two communities.
Hindu hard-liners say they want to build a new temple to Hindu god Ram on the site, which they revere as his birthplace. They say the mosque was built after a temple dedicated to the Hindu god was destroyed by Muslim invaders.
K. Parasaran, an attorney for a Hindu group, told the court that there were several mosques in Ayodhya town where Muslims can pray, but Hindus cannot change the birthplace of their deity Ram.
The court hearing on Wednesday witnessed an element of drama when advocate Rajeev Dhavan, representing Muslim parties in the dispute, tore a pictorial map of the disputed land put forward by an attorney representing Hindu groups, the Press Trust of India news agency reported.
Dhavan was showing his opposition to the attorney presenting a map at this late stage.
Prime Minister Narendra Modi had promised to build the temple in 2014 elections that brought him to power. But he later decided to wait for the court verdict despite pressure from millions of Hindu hard-liners who asked his government to bring legislation to build the temple.
Authorities on Saturday banned the assembly of more than four people at one place and deployed additional police and paramilitary forces in and around Ayodhya, 550 kilometers (350 miles) east of New Delhi, to prevent any attacks by Hindu activists on Muslims, who comprise 6 percent of the town’s more than 55,500 people.
After the demolition of the mosque in 1992, Hindus and Muslims took the issue to a lower court, which in 2010 ruled that the disputed land should be divided into three parts — two for Hindus and one for Muslims.
That was challenged in the Supreme Court by the two communities represented by Hindu Maha Sabha , the Sunni Waqf Board and the Nirmohi Akhara .