Across the country, the escalating costs of medical school have driven young doctors away from lower-paying specialties, such as pediatrics and psychiatry, as well as jobs in rural or less wealthy areas.

The lack of primary care physicians is particularly acute in California, which has a growing aging population and the country’s largest Medicaid population — and one of the lowest state reimbursement rates for doctors in the country. California is projected to have a shortfall of 4,700 primary care clinicians by 2025, according to a 2017 report by the University of California, San Francisco.

The new program aims to change that using revenue from Proposition 56, which imposed a tax on tobacco products, t o help physicians pay back their loans. It will disburse a total of $340 million. To qualify, the physicians, who receive up to $300,000 each in debt relief, must agree to spend a third of their time with Medi-Cal patients over the next five years. As part of the first round of funding, announced this month, 247 physicians will receive $58.6 million and 40 dentists will receive $10.5 million in debt relief.

N early 1,300 providers applied for the awards, according to the Department of Health Care Services. The program’s administrators said they assessed candidates based on personal statements, work history and specialization, among other factors. Applications for the next round of awards will be accepted in January.

Dr. Rishi Manchanda, who was part of a commission that put forward a $3 billion, 10-year plan to address the shortfall of doctors in California, called the repayment program “a big step in the right direction” that would immediately dispatch clinicians to serve these populations. But more needs to be done, he said, to bolster the pipeline of doctors practicing in the state.