A senior judge is backing a controversial new law as a means of increasing the number of women and ethnic minorities at the top of the judiciary.
Lord Neuberger of Abbotsbury said he has "no difficulty" with female or ethnic minority candidates being favoured over white men when the two applicants are otherwise equal.
But he said it would be "unfair" not to pick men if they were the better candidates.
In an interview with The Times, the Master of the Rolls said: "The proportion of women and ethnic minorities among the senior judiciary is worryingly small. It is clear that we are moving in the right direction, but very slowly."
The judge said applying section 159 of the Equality Act to the judiciary would help the situation.
The section, which took effect in April, allows "positive" action in relation to recruitment and promotion in England, Wales and Scotland.
The provision does not permit positive discrimination, such as quotas, which continues to be illegal.
Lord Neuberger, who is the second most senior judge in England and Wales, told the newspaper: "If you've got two equal candidates, you go for women and ethnic minorities - I have no difficulty with (that)."
But he cautioned against going further than section 159, saying he considered it "patronising" to give people the job if they were not the best candidate.
Some Conservatives have opposed the act, introduced by Labour Deputy Leader Harriet Harmon.
Expressing concern about the new provision, Dominic Raab, MP for Esher and Walton, wrote in a blog: "When it comes to offering a job, the decisive factor may now ultimately be race, gender, sexuality, age, disability, religion, philosophical belief or other social factors - positive discrimination by any other name.
"It will be voluntary to begin with, but the Commission clearly expects to coax and cajole its increasing use."
Lord Neuberger said judges were split over the issue.
He said a number of women judges oppose it because of "the feeling that 'I only got the job because they wanted a woman", but said many more are in favour of it.