To maximize the benefits of a vaccine for society, those most likely to die or to utilize large amounts of scarce resources if they become infected should be given the vaccine first. This should be modified, if it turns out children do not fall ill, but are a major source of coronavirus transmission. Giving children priority for vaccines would then be justified because it would help save others.

Finally, when a vaccine is produced, there will initially be severe shortages. With 50 million Americans over age 65, 16 million who have emphysema, five million with heart failure and 30 million with diabetes, initially there will be more people who need the vaccine than can get it. Whom to choose? In this case, after vaccinating frontline health workers and other first responders, equality suggests a random selection, such as a lottery, among those in the highest risk category of dying from coronavirus.

Rationing lifesaving interventions is horrendously wrenching. No one wants to choose which patient gets a ventilator or vaccine, and which patient may die because he or she does not. For doctors and nurses this presents the specter of abandoning patients. It readily leads to burnout — and therefore less effective care. For patients and families, the denial of potentially lifesaving treatment generates feelings of disempowerment, being discarded and having one’s one’s worth denied. Some will erupt in anger. Others will be crushed. Many will feel betrayed by a society that was supposed to protect them. Understandably, as humans, we try to avoid such tragic choices at all costs. But Covid-19 — not humans — will force us to make those choices. The best answer we have is to make these choices as ethically as possible, and to alleviate pain and suffering.

We need to decide how we will deal with these choices now, before rationing becomes necessary. The government and medical societies must provide guidance and legal protections for hospital and medical workers. We cannot leave these decisions to the frontline clinicians fighting the virus, forcing them to make well-intentioned, but ad hoc choices under extreme pressure. In the face of a shortage of medical resources, we need to delineate the best allocation principles so that decisions are made ethically, even if we abhor the fact that such decisions must be made.

We hope America will never need to ration resources for Covid-19. If rationing is never needed, then these discussions, as anxious as they make both the public and professionals, will have served as a critical exercise in disaster preparation. But if we are forced to ration, we need to do it right.

Dr. Emanuel is vice provost of global initiatives and a professor at the University of Pennsylvania, Dr. Phillips is an assistant professor of emergency medicine and chief of disaster and operational medicine at George Washington University Hospital, and Mr. Persad is an assistant professor at the University of Denver Sturm College of Law.

The Times is committed to publishing a diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are some tips. And here’s our email: letters@nytimes.com.

Follow The New York Times Opinion section on Facebook, Twitter (@NYTopinion) and Instagram.