India's top court on Wednesday ruled that a man is committing rape if he engages in sexual intercourse with his wife who is aged between 15 and 18, a landmark decision that will affect millions of child brides.

The legal age of consent is 18 years. The law regards even consensual sex with a woman under 16 as rape, but an exception had been made for intercourse between a man and his wife who is between 15 and 18.

Marital rape is not a crime in India, where the government has said criminalizing marital rape could destabilize marriages and make men vulnerable to harassment by their wives.

The Supreme Court ruled the age of consent was 18 for "all purposes" after hearing a petition by Independent Thought, a non-profit group that sought to criminalize sex with underaged wives.

"Sexual intercourse by a married man with their minor wife below 18 years is rape," the court said in its judgment, which was welcomed by women's rights campaigners.

"I am very happy with the supreme court judgment," Vikram Srivastava, a lawyer for Independent Thought, told Reuters.

"The judgment gives a boost to the national campaign of Beti bachao and beti padhao," he added, using a Hindi phrase meaning "Save the girl child and educate the girl child."

The additional solicitor general, P.S. Narasimha, who represented the government, declined to comment.

A teenage bride cries in a village near Baran, in the northwestern state of Rajasthan, in January 2013. India is among the top 10 countries with the highest rates of child marriage. (Danish Siddiqui/Reuters)

Wednesday's verdict would not be applied retroactively, however, said the court, which based its conclusions on India's Child Marriage Prohibition Act.

Though illegal, child marriage is deeply rooted in India. Factors such as poverty, weak law enforcement, patriarchal social norms and concerns about family honour are often blamed.

Marriages in India are considered to involve a child if the woman is below 18 or the man younger than 21. Men both above and below the legal age may marry child brides.

India's 2011 census showed child marriage had declined marginally from a decade earlier, but more than five million girls were still married before the legal age of 18.

More than a quarter of Indian women between 20 and 24 said they were married before 18, and a fifth of men between 25 and 29 said they married below the legal age, the National Commission for the Protection of Child Rights and the charity Young Lives said in a recent report analyzing the census data.

The number of underage brides has declined 0.3 per cent in rural areas since 2001, but in urban areas it increased 0.7 per cent, the report said.

The study, the first to break down India's census data on child marriage, found that nearly one in four girls in rural areas and one in five in urban areas married before 18.

Despite efforts to empower girls and women and toughen penalties, India is among the top 10 countries with the highest rates of child marriage, along with Burkina Faso, Chad, Guinea, Niger and South Sudan.