The British Army secretly restricted the number of recruits from ethnic minorities for 20 years, newly released official documents show.
A black guardsman on duty
From 1957 Army medical officers were instructed to note all new recruits with "Asiatic or Negroid features".
The data were used to limit the number of "non-white" troops in the Army.
The secret system was uncovered after about 50,000 government files were made public on the first working day of the Freedom of Information Act.
The Ministry of Defence (MoD) says the report "does not reflect the current situation" within the armed forces.
Many of the government papers had been kept hidden from the public for decades under the 30-year rule.
But under the Act, implemented on 1 January, the public gains the right to see documents held by more than 100,000 bodies.
The army's recruiting system was even kept secret from government ministers and official race monitors, the documents released under the Freedom of Information Act show.
It appears from the documents, released to the National Archives, that the information was used to limit the number of ethnic minority troops, designated "D factor" personnel.
Medical officers were given considerable latitude in deciding who was classified as "D factor" or non-white. It could even include people of Mediterranean appearance or a "swarthy Frenchman", according to the documents.
The system was outlined in a confidential briefing paper, written for the Adjutant General of the Army in 1972.
"Officially, we state that we do not keep statistics of coloured soldiers," it says.
"In fact, we do have a record, resulting from the description put on the attestation paper by the medical officer, of the features of the recruit.
"At Manning and Record offices, a broad division is drawn between north European and all others, and punch cards for the latter are punched in such a way they can be identified if required."
It added: "The determination of the characteristics is at the discretion of various medical officers, and could include Chinamen, Maltese or even swarthy Frenchmen."
The system was supposed to help the Army ensure its quota restrictions on non-Europeans was adhered to.
In February 1974, Denis Brennan in the Adjutant General's office said the way the Army recorded colour was "complex".
He said: "We do not feel it would be appropriate to mention it to ministers."
The Army chose to lie when asked for a breakdown of serving coloured officers by the Institute of Race Relations in 1972. The Army had agonised over what to do for nine months.
The Institute was told by the Army it did not keep such data. In fact, the Army's "D factor" data showed how few non-white personnel there were.
There was only one non-white soldier in the Royal Military Police and one in the Intelligence Corps.
Defence Secretary Denis Healey had referred to "the unsatisfactory situation with regard to strengths of coloured men in certain Army regiments" in 1968.
By the mid 1970s, officials noted "the matter seems to have died".
When challenged, the Army would always highlight the numbers of non-white soldiers in its sports teams.
There were reports of fighting between black and white soldiers in the Queen's Division in 1975.
However, government ministers were assured: "There are members of the coloured community in every branch of the services."
An MoD spokesman said the Army now took ethnic minority recruitment very seriously.
"We strive to employ the best recruits irrespective of their ethnic backgrounds," he said.
The Army fully complied with equal opportunities legislation and had an "excellent relationship" with the Commission for Racial Equality, the spokesman added.