When a 35-year-old teacher arrived at Heathrow on 24 January 1979, she planned to marry her fiance, a British resident of Indian descent.

Instead she found herself at the centre of a "virginity testing" row that led to headlines in Britain and India, and an immediate debate over whether her experience was an isolated incident or general immigration practice.

Immigration rules at the time meant that a woman coming to Britain to marry a fiance did not need a visa if her wedding was to be held within three months.

However, internal Home Office papers from the time show that the immigration officer at Heathrow justified the order for a "virginity test" on suspicions that she might already be married, given her age, and the fact that she was travelling with her fiance. If they were already married, she would have needed a visa.

The immigration service told Home Office ministers: "It appears that the passenger asked for a lady doctor but was told that there was not one on duty, that even if she went to Hillingdon hospital, the gynaecologist on duty might be a man, and that if she wanted to have a woman doctor it would be necessary for her to wait.

"She elected to have the examination done immediately." However, the woman told the Guardian she consented only because she was frightened she would be sent back to India.

The Guardian's exclusive disclosure of the tests led to front-page stories in every leading Indian newspaper, with the incident denounced as "an outrageous indignity" and "tantamount to rape". The Home Office initially confirmed that her referral for a medical examination "to see whether she was, in fact, a bona fide virgin or fiancee" but said it was an isolated incident.

The files, however, show that this line alarmed the British immigration entry clearance officers working in India. A confidential cable from the British high commission in New Delhi to the Foreign Office says they not only had to deal with the impact of the Heathrow incident in India but also to defend their policy and practice: "For this purpose the comments of the Home Office spokesman are not altogether helpful," read the cable.

"In framing our defence, you will no doubt take account of the fact that in accordance with the requirement that they should satisfy themselves with an applicant's bona fides, entry clearance officers here, in Bombay and presumably other ports seek medical opinion on the marital status of some female applicants. In Delhi all such examinations are carried out by a woman gynaecologist."

The row over the scale of virginity testing, particularly at British immigration posts on the Indian subcontinent, was stirred by the intervention of Alex Lyon, a former Labour immigration minister. Lyon said that he had discovered that "virginity tests" were being used in Dhaka, Bangladesh, while he was at the Home Office and had ordered in 1975 that the practice be stopped in Britain and at entry clearance posts worldwide.

But the Home Office files reveal that the order was not implemented outside Islamabad: "Mr Lyon's instructions arose from a single case in Islamabad [not Dhaka], where in the course of a general medical examination of a fiancee the doctor noted in her report that she had detected signs of marriage although the applicant claimed to be unmarried," notes one official.

But perhaps the clearest evidence that the practice was widespread comes in a draft Foreign Office reply for the then Labour prime minister, Jim Callaghan, to a protest from his Indian counterpart, Morarji Desai. It says that the then foreign secretary, David Owen, felt it necessary to acknowledge that other cases had taken place.

"The facts, as far as India is concerned, are that since October 1975 (the date of Alex Lyon's instruction that medical evidence should not be used to refuse an applicant) there appear to have been nine cases in Bombay and 73 in New Delhi where it is possible that a vaginal examination might have taken place."

The Foreign Office tries to portray these as routine medical tests. But two other later Home Office briefing papers clearly refer to cases in Delhi of "some adult daughters applying for settlement who were referred to an Indian lady gynaecologist with questions about their marital status".

It is this evidence that suggests that at least 80 women went through such "virginity tests" in the late 1970s.

In their study of the cases, Australian legal academics, Dr Marinella Marmo and Dr Evan Smith, say that immigration officers justified the use of the tests on the stereotype of south Asian women as "submissive, meek and tradition-bound" and on the "absurd generalisation" that they were always virgins before they married. They also point out that the tests were useless: not every woman has a hymen.

Callaghan was keen to close down the whole matter. He sent a message to Desai telling him that "as soon as we heard of it we made sure it would not happen again" and assured him that it was never general practice to ask women to undergo such examinations.

However, it was not enough to prevent India going to the UN commission on human rights and raising the use of immigration practices that seemed to "reflect prejudices dating back to the dark ages".