A famous mosque in India has agreed to scrap a ban on women entering its inner sanctum after a bitter legal battle about the restriction.

The Haji Ali Dargah trust has barred women from the mausoleum off the coast of Mumbai since 2011, insisting the presence of women near the tomb of a revered saint is a "grievous sin" in Islam.

The trustees had appealed to the Supreme Court against a lower court's decision in August to overturn the ban as a violation of constitutional rights of equality.

But the trust told the Supreme Court on Monday it would now admit women but needed several weeks to set up special entry areas to the tomb in the 15th-century building.

READ MORE: India - Muslim women fight to overturn triple talaq

"The trust has decided to give women access to the sanctorum housing the saint's tomb," its lawyer Gopal Subramanium told the court.

A Muslim women's rights group hailed the decision as a victory which would likely put pressure on other places of worship that have gender restrictions.

"It is restoring the Islamic values of what we have always believed as Muslims, that Islam is a religion of equality, democracy and women's rights," Noorjehan Niaz, co-founder of Bharatiya Muslim Mahila Andolan, which campaigns for the rights of Muslim women in India, told AFP news agency.

Niaz was one of the petitioners who filed the case against the Haji Ali Dargah trust on constitutional grounds.

Women in India have been intensifying their campaigns to be allowed to enter a number of Hindu temples and other religious sites.

READ MORE: Vidhya Das - Fighting for poor women in India

Hundreds of women staged a protest march to a temple in Maharashtra state in January, leading the high court in Mumbai to strike down a ban against women entering a shrine there.

Haji Ali Dargah is one of Mumbai's most recognisable landmarks and receives tens of thousands of not only Muslims but Hindu devotees and sightseeing tourists every week.

The mosque is located on an islet accessible via a causeway at low tide.

It was built in memory of a wealthy Muslim who gave up his worldly possessions and went on a pilgrimage to Mecca.

Source: Agencies