Hundreds of trainee doctors will be forced to resit a high-stakes medical exam after a technical glitch locked candidates out of an online test before they finished on Monday.

The Royal Australasian College of Physicians said an "unknown technical fault" was to blame for trainees not being able to finish their basic training test at sites across Australia and New Zealand.

College president Dr Catherine Yelland expressed disappointment at the glitch and apologised to trainee candidates for "the distress caused" on Monday.

The test costs at least $1800 to sit and is considered a "gateway exam" for doctors who want to further specialise as a physician or paediatrician.

One candidate, who did not want to be named, sat the exam in Sydney and said an error message flashed up on her screen as she finished the first part of the exam.