A judge in the Indian capital, Delhi, has said that pre-marital sex is "immoral" and against the "tenets of every religion".
Judge Virender Bhat made the remarks after ruling that sex between two adults on the promise of marriage did not amount to rape.
Pre-marital sex remains a cultural taboo in India.
Last year, a court in Delhi said live-in relationships were immoral and an "infamous product of Western culture".
Judge Bhat presides over a fast-track court set up in the Indian capital to dispose of cases relating to sexual offences against women.
He made his latest remarks while clearing a man employed with a multinational company of charges of rape.
The 29-year-old had been arrested after a woman working in a different company lodged a complaint of rape against him in 2011.
The woman alleged that the man had sex with her after promising marriage.
"In my opinion, every act of sexual intercourse between two adults on the assurance of promise of marriage does not become rape, if the assurance or promise is not fulfilled later on by the boy," Judge Bhat was quoted as saying by the Press Trust of India.
"When a grown up, educated and office-going woman subjects herself to sexual intercourse with a friend or colleague on the latter's promise that he would marry her, she does so at her own peril. She must be taken to understand the consequences of her act and must know that there is no guarantee that the boy would fulfil his promise.
"He may or may not do so. She must understand that she is engaging in an act which not only is immoral but also against the tenets of every religion. No religion in the world allows pre-marital sex," the judge added.
In 2010, the Supreme Court dismissed a number of cases against a Tamil actress who spoke in support of the right of women to have pre-marital sex. The court also endorsed the right of unmarried couples to live together.
Actress Kushboo was accused of "outraging public decency" and 22 cases were filed against her in 2005.