British-born medics should not be given training priority over foreign doctors already in the UK, the British Medical Association (BMA) has declared.
There have been problems with a new recruitment system
A government consultation has been launched after a report said thousands of UK doctors could not find jobs because of soaring foreign applicants.
The BMA said medical immigration did need to be controlled, but not at the expense of those already here.
Many had spent thousands of pounds of their own money on training, it said.
Ministers promised to look into the issue of applications from outside the European Economic Area (EEA) following a key report by Sir John Tooke.
He had looked into the recruitment problems in the wake of a new training system, and had concluded that the number of overseas applications had exacerbated an already difficult situation.
Some 16,000 of the 30,000 graduates chasing 20,000 jobs this year were foreigners.
Around 13,500 of these were from beyond the EEA. Around 10,000 were on the UK's highly skilled migrant programme, and many of the others were paying to attend medical school here.
There would be legal issues with giving UK graduates preference over those from European member states, but this would not apply to those born outside of the EEA.
The BMA said all non-UK nationals who were currently studying medicine in the UK should be able to complete their entire training in the UK.
In addition, those on the highly skilled migrant programme should be allowed to compete for posts on the same basis as UK graduates.
"The thousands of overseas junior doctors currently providing essential services in UK hospitals must not be scapegoated for the government's poor workforce planning," said Dr Terry John, chairman of the BMA's International Committee.
"They came to the UK in good faith and in the honest expectation of training opportunities in the NHS."
A spokesperson for the Department of Health said: "Most other countries give a priority to their own medical school graduates when appointing to specialist training posts.
"The proposal only affects post-graduate and specialty training. It does not affect the thousands of NHS service jobs which doctors from outside the EEA can apply for."