Would-be doctors will be able study at Bangor University throughout their training from 2019, as part of plans to expand medical education in Wales.
There are already schools of medicine in Cardiff and Swansea, but students currently only train in north Wales when they are on placement.
It is hoped the move will drive more doctors to north Wales.
Health Secretary Vaughan Gething said the move would address the challenges faced by the medical workforce.
The partnership with Cardiff University aims to encourage more students to undertake their postgraduate training within the same area.
Cash incentives are already being offered to trainee GPs to boost recruitment and tackle the shortage of doctors in Wales.
Hywel Williams MP for Arfon said: "There is overwhelming evidence to show that medical students stay to become GPs and doctors in the area they are trained.
"This development is great news for patients who currently face long waiting times for appointments due to doctor shortages."
Siân Gwenllian AM for Arfon said: "This is excellent news as it will mean that for first time doctors will be based in Bangor for their medical training.
"Introducing undergraduate medical education will enhance the University and Ysbyty Gwynedd and in turn will bring immense benefits to the city of Bangor and its people."
Prof John G Hughes, vice-chancellor of Bangor University, said: "We very much look forward to working with both Cardiff University and Betsi Cadwaladr University Health Board in order to educate many more doctors in north Wales over the coming years."
Under the new plans, students at Bangor will have longer placements and a greater emphasis on working within the community.