Barring a minor miracle, Republican senators will narrowly vote to confirm Amy Coney Barrett to the Supreme Court next week, just eight days before an election that likely will sweep many of their members and President Trump out of office.

Leaving aside the prospect that Republican-appointed justices would try to “steal” the election for Trump, Congress will retain the power to protect Democratic policy preferences on several hot-button issues. And it can do so without adding seats to the Supreme Court or curtailing its jurisdiction.

Take, for example, the Affordable Care Act. The ACA is before the Supreme Court only because Congress reduced the law’s individual mandate penalty to zero in 2017. Conservatives dubiously argue that because there is no enforceable individual mandate (dubbed a tax by Chief Justice John G. Roberts Jr.’s majority opinion in NFIB v. Sebelius), the entire law is invalid. Even if the court strikes down the ACA in its entirety, Congress could reinstate the mandate with a $1 tax and thereby rescue the law and all its provisions, including its protections for preexisting conditions and the measure allowing children to remain on their parents’ insurance until age 26.

Presumably, conservatives on the court could shop around for another case to reverse NFIB. If such a case were to arise, Roberts would be expected to join the three liberal justices, and it would likely come down to Justice Neil M. Gorsuch to decide to reverse NFIB. If he does, the ACA may fall. But until then, Congress can go a long way to preserve the law.

Then there is gay marriage, which the Supreme Court by a 5-4 majority ruled is protected by the 14th Amendment in Obergefell v. Hodges. It is not clear whether the Supreme Court, after hundreds of thousands of Americans took advantage of the decision to get married, would sweep it away or invalidate current marriages. However, if it took that step, constitutional scholar Laurence Tribe opines, “In my view, Congress would have power to pass a Defense of All Marriage Act mandating recognition of other states’ marriages” under Article IV of the Constitution. Senate Republicans might seek to block such a measure, but Democrats could break through their opposition by getting rid of the filibuster.

Finally, abortion is where we will see just how determined Barrett and her conservative cohorts are to pursue their social agenda. Roe v. Wade was decided in 1973; Planned Parenthood v. Casey, which established the undue burden test, was decided in 1992. If Barrett is as much of an activist, pro-life judge as she seems, she could well invalidate these decades-old precedents. Roberts (who now cites precedent in defense of abortion rights) would likely join the three liberal justices, once again putting Gorsuch in the position of breaking a 4-4 tie. Let’s assume he goes along with Barrett.

Congress could, once again, pass a law concretizing abortion rights in federal law. Ironically, the court has already seemed to accept the notion that Congress has the power to regulate abortion for the entire country in the antiabortion rights decision in Gonzales v. Carhart, when the court upheld Congress’s “partial birth” abortion law.

But it is far from clear that an activist Supreme Court wouldn’t strike down a federal abortion rights law. As Tribe points out, “The main precedent that defenders of such a law would invoke, Gonzales v. Raich (2005), upheld an Act of Congress criminalizing the production and use of homegrown marijuana even in states permitting its medicinal use under closely regulated circumstances. The Raich majority relied on the Interstate Commerce Power even though the law at issue didn’t regulate interstate commerce as such.” Many conservatives think Raich was wrongly decided, so that might not pass muster with this court.

Former counsel to the House impeachment managers Norman Eisen observes, “Litigants could be expected to argue for example that these types of statutes [overriding court decisions] do not sufficiently relate to commerce among the states, and so are not a constitutionally allowable use of Congressional authority under the Commerce Clause.” He argues, “All options should be on the table to respond to the GOP’s abuses relating to the federal courts.”

Alternatively, Congress might try to solidify abortion access in Medicaid and the ACA (subject to all the “conscience” clause exceptions that the court has imposed), in essence using the spending clause to preserve abortion rights. Here, too, the outcome is not certain.

Preserving abortion rights in this way, Tribe points out, is “not a foregone conclusion. ... If Congress lacks power under the Commerce Clause or some other affirmative source of regulatory authority to lift an otherwise constitutional state prohibition on a given activity, it’s at least arguable that Congress cannot override that prohibition by the expedient of subsidizing the activity in question and thereby giving the activity its blessing.”

As you might have surmised, the intervention of the Supreme Court in contravention of popular measures (the ACA, Roe and gay marriage) could well trigger an ongoing battle between the elected branches and the court. It is here that the court risks its legitimacy and might invite court-packing measures, much as the Supreme Court’s assault on New Deal legislation triggered President Franklin Delano Roosevelt’s court-packing scheme. The scheme failed, but the court backed off, handing FDR what he wanted. That episode should serve as a warning to the activist court: Temper its zeal, or face an attack from the elected branches.

Read more: