WASHINGTON — The Supreme Court appears ready to rule that hospitals in Idaho may provide medically necessary abortions to stabilize patients at least for now, despite the state's strict abortion law, according to a copy of the opinion that was briefly posted on Wednesday to the court's website and obtained by Bloomberg News.

The document suggests that a 6-3 ruling from the court will reinstate a lower court's order to allow Idaho emergency rooms to provide abortions that save a woman's health as the broader legal case plays out.

The Justice Department had sued Idaho over its abortion law, which allows a woman to get an abortion only when her life — not her health — is at risk. Idaho doctors say they were unable to provide the stabilizing treatment the federal law requires and that is typically standard of care, prompting them to airlift at least a half-dozen pregnant patients to other states since Idaho's law took effect in January.

But attorneys for Idaho have said their state law allows for women in dire circumstances to get an abortion and is not in conflict with the federal law.

The federal law, called the Emergency Medical Treatment and Active Labor Act, or EMTALA, requires doctors to stabilize or treat any patient who shows up at an emergency room.

Here's a look at the history of EMTALA, what rights it provides patients and how a Supreme Court ruling might change that.

What protections does EMTALA provide patients at an ER?

The law requires emergency rooms to offer a medical exam if you turn up at their facility. The law applies to nearly all emergency rooms — any that accept Medicare funding.

Those emergency rooms are required to stabilize patients if they do have a medical emergency before discharging or transferring them. And if the ER doesn't have the resources or staff to properly treat that patient, staff members are required to arrange a medical transfer to another hospital, after they've confirmed the facility can accept the patient.

So, for example, if a pregnant woman shows up at an emergency room concerned that she is in labor but there is not an OB-GYN on staff who could deliver her baby, hospital staff cannot simply direct the woman to go elsewhere.

Why was this law created?

Look to Chicago in the early 1980s.

Doctors at the city's public hospital were confronting a huge problem: Thousands of patients, many of them Black or Latino, were arriving in very bad condition — and they were sent there by private hospitals in the city that refused to treat them. Some were gunshot victims who hadn't been stabilized. Most of them did not have health insurance.

Chicago wasn't alone. Doctors working in public hospitals around the country reported similar issues. Media reports, including one of a pregnant woman who delivered a stillborn baby after being turned away by two hospitals because she didn't have insurance, intensified public pressure on politicians to act.

Congress drafted legislation with Republican Sen. David Durenberger of Minnesota saying at the time, ''Americans, rich or poor, deserve access to quality health care. This question of access should be the government's responsibility at the federal, state, and local levels.''

Then-President Ronald Reagan, a Republican, signed the bill into law in 1986.

What happens if a hospital turns away a patient?

The hospital is investigated by the Centers for Medicare and Medicaid Services. If they find the hospital violated a patient's right to care, they can lose their Medicare funding, a vital source of revenue needed for most hospitals to keep their doors open.

Usually, however, the federal government issues fines when a hospital violates EMTALA. They can add up to hundreds of thousands of dollars.

Why did the Supreme Court look at the law?

Since the Supreme Court overturned the constitutional right to an abortion, President Joe Biden, a Democrat, has repeatedly reminded hospitals that his administration considers an abortion part of the stabilizing care that EMTALA requires facilities to provide.

The Biden administration argues that Idaho's law prevents ER doctors from offering an abortion if a woman needs one in a medical emergency.

But Idaho's attorney general has pointed out that EMTALA also requires hospitals to consider the health of the ''unborn child'' in its treatment, too. Attorneys for Idaho have also said that there's no conflict between the state and federal law since Idaho allows doctors to perform an abortion if the woman's life is at stake.

What are the advocates saying?

Anti-abortion advocates argue that state laws banning abortion can coexist with the federal law that requires hospitals to stabilize pregnant patients in an emergency.

The prominent anti-abortion group Susan B. Anthony Pro-Life America has called the lawsuit in Idaho a ''PR stunt."

''The EMTALA case is based on the false premise that pregnant women cannot receive emergency care under pro-life laws,'' said Kelsey Pritchard, the group's state public affairs director after the case was heard earlier this year. ''It is a clear fact that pregnant women can receive miscarriage care, ectopic pregnancy care and treatment in a medical emergency in all 50 states.''

But many doctors say it's not as clear cut as anti-abortion advocates claim.

In rare cases, a woman may risk sepsis, hemorrhaging or reproductive organ loss if a troubled pregnancy is not terminated. But Idaho's state law forces a doctor to wait until the patient is close enough to death to end a pregnancy, doctors argue.

Doctors risk a minimum two-year imprisonment for providing an abortion if the woman's life is not at risk.

''There's nothing worse than feeling as a physician that you know what the patient needs and you can't get it for them,'' Dr. Jessica Kroll, the president of the Idaho American College of Emergency Physicians told reporters during a press conference early this month.