Doctors resident outside the EU will no longer be able to apply for postgraduate training posts in the UK under new immigration rules.
There has been fierce competition for training posts
The Home Office announcement follows sustained criticism from doctors' bodies that UK graduates are unable to find work due to the competition.
The new rules will come into effect for the 2009 recruitment round.
In the past, the NHS has employed many foreign doctors because there were too few UK medical graduates.
But an expansion of medical school places redressed this shortage, leaving doctors fighting for places.
The rules, which will not apply to those doctors already working in the NHS, will produce a drop of between 3,000 and 5,000 overseas applications next year, official estimates suggest.
This year it is thought there will be about 9,000 places on speciality training programmes, and employers expect there may be as many as 23,000 applications.
Without a training post, a junior doctor from the UK will find it very difficult to become a GP or consultant.
Critics argue that it is a huge waste of taxpayers' money to spend some £250,000 on training each medical graduate and then being unable to provide them with a job.
Others suggest that such fierce competition for places among both foreign and UK candidates mean patients end up with the best possible doctor in the job.
Health Secretary Alan Johnson said: "I cannot stress enough that we are not closing the door to international doctors working in the NHS. These new rules only apply to training places in the UK.
"International doctors will still be able to come and work in the NHS in thousands of other non-training posts and will still be able to fill training places in shortage specialties."
Separately, the government is currently appealing to the House of Lords against ruling which stopped them giving priority to UK graduates over foreign doctors already here in the UK.
The British Association of Physicians of Indian Origin (BAPIO), the organisation which challenged this guidance, said the new immigration ruling was the right decision but "very late".
"We have been warning the government about this for many years. Of course we should be looking after local applicants first," said Dr Ramesh Mehta, BAPIO's president.
"What's important is that those who are already here - who came here in good faith in different times - are not discriminated against."
NHS Employers said it too welcomed the decision.
"Employers will see this as a positive step in addressing the current oversupply of doctors," said director Steve Barnett.
"We have grown the graduate workforce in the UK and now need to maximise opportunities for UK and EEA graduates by giving them priority in the first few years of their postgraduate training."
Shadow Health Minister Stephen O'Brien said the measures should relieve UK doctors of some of the pressure but that better workforce planning could have avoided the situation in the first place.
"And what will happen if we end up needing doctors from outside the EU in the future? I fear a bad taste may be left in the mouths of doctors who have left home and family behind to bring their expertise to the NHS."
Dr Hamish Meldrum, of the British Medical Association, said: "Taxpayers have made a major investment in the careers of UK doctors, and it makes sense to manage the numbers of international doctors coming to work in the NHS in future.
"Our concern is that the overseas colleagues already working in the UK are being both scapegoated and sent confusing messages.
"At a time when they need clarity, it's being made very unclear to them what jobs they can apply to and when."