Twenty-one Georgia hospitals are in line for millions in additional funding, possibly over several years, to hire more health care workers and ensure hiring diversity.

The new federal money is estimated at nearly $500 million a year and will go to 21 teaching hospitals across the state.

Dr. Bryce Gartland, co-chief of clinical operations at Emory Healthcare, which helped lobby for the money, said in a statement the money will help train the next generation of nurses.

The program comes in the midst of a historic shortage of doctors and nurses, and amid growing understanding that a lack of diversity in medical personnel harms patient care. The demands of the pandemic made the existing health worker shortage far worse.

Over the past two years, many staff nurses left for jobs with private temporary staffing agencies where pay was much higher and they could choose where to go. That contract labor expense pushed some hospital budgets into the red.

“The pandemic has put unprecedented pressure on all our teams and has made our staffing challenges even worse,” Shayne George, CEO of Memorial Health in Savannah, said in a written statement. The money “will help Memorial Health recruit and train clinical staff to serve patients who need the high level of care we provide.”

The money will come through additional Medicaid funding. Medicaid is a state-federal partnership, with the majority funded by the federal government. The calculations of which of the hospitals get how much money will be made based on the amount of care they give to patients insured by a branch of Medicaid, the government insurance program for lower-income people.

Many of the hospital systems on the list are affluent, but they say they need more reimbursement to continue to treat large numbers of patients who are not able to pay.

The federal government is allowing that additional reimbursement as long as the money goes toward certain goals. In the case of Georgia’s application, the goals include “innovative programs leading to stabilization, development, and diversification of the healthcare workforce,” including better access to care.

The Biden administration made the decision to approve Georgia’s application. A remarkably bipartisan group of Georgia lawmakers signed the letter asking for it, led by U.S. Sen. Jon Ossoff, a Democrat, and U.S. Rep. Buddy Carter, a Republican.

The only holdouts from Georgia’s congressional delegation who didn’t sign were Republicans Marjorie Taylor Greene, Andrew Clyde and Jody Hice.