President Biden supported making an exception to filibuster rules in order to pass legislation codifying Roe v. Wade into law, an effort that would face challenges due to key Democratic opposition.

“The most important thing to understand is that we must codify Roe v. Wade into law, and the only way to do that is for Congress to vote to do so,” Mr. Biden told reporters during a press conference in Spain. “And if the filibuster gets in the way, like voting rights, an exception should be made for this…to the filibuster.”

Changing the Senate’s filibuster rules would allow legislation protecting abortion access to pass the chamber with 51 votes instead of the 60 required for bills to advance. Mr. Biden previously supported an exception to filibuster rules in order to pass long-stalled election legislation. It was the first time the president publicly supported changing the filibuster rules in order to pass legislation codifying Roe v. Wade.

The filibuster could be lifted with a simple majority vote, but not all Democrats in the 50-50 Senate agree, arguing that doing so would fundamentally change the nature of the Senate and could backfire if the GOP takes control.

Because Sens. Joe Manchin of West Virginia and Kyrsten Sinema of Arizona, both moderate Democrats, have stated their opposition to changing or eliminating the Senate’s filibuster rules, such legislation may still face obstacles in passage. Their offices did not respond immediately to requests for comment on Mr. Biden’s remarks.

The Supreme Court overturned Roe v. Wade, the 1973 decision that established a constitutional right to abortion, last week. A majority of the court ruled in the decision that there was no provision in the Constitution that implicitly protected the right to abortion, relegating the issue to the states.

Members of the president’s own party have pressed him to respond more forcefully to the ruling and to outline more executive actions. Some Biden administration officials privately expressed concern earlier this week that the president’s response had not been aggressive enough. White House aides have warned that no executive-branch policies can fill the void left by the court’s decision, arguing that Congress must act.

Senate Minority Leader Mitch McConnell (R., Ky.) and his fellow Republicans oppose changing the filibuster rules for any legislation, and Mr. McConnell has stated that if his party regains control of the Senate, he will not change the rule. Democrats most recently attempted to suspend the filibuster in order to pass voting-access legislation, but were defeated when Mr. Manchin and Ms. Sinema joined Republicans in opposition.

Mr. McConnell has previously warned Democrats that if they do lift the filibuster, which he claims will silence the millions of Americans represented by Republican senators, “we will make their voices heard in this chamber in ways that are more inconvenient for the majority and this White House than anything anyone has seen in living memory.”

Some moderate Democrats have warned that if Republicans gain control of the chamber, a change in filibuster rules would allow them to enact nationwide abortion restrictions or pass other legislation Democrats oppose with 51 votes.

Earlier this week, House Speaker Nancy Pelosi (D-Calif.) stated that Democrats were considering re-voting on an existing abortion bill that had stalled in the Senate after all Republicans and Mr. Manchin opposed it. Mr. Manchin and several moderate Republicans said they could support alternative legislation but opposed the bill because it would have nullified some state bans allowed under previous high court rulings and contained language that critics saw as making late-term abortions too easy to obtain.

She also stated that the party was looking into safeguards for personal data stored in health apps used to track menstrual cycles. She also suggested that the House consider legislation to protect Americans’ right to travel freely, effectively preventing states from criminalizing abortion-related travel. She also suggested that the House consider legislation to codify the legality of same-sex marriage and access to contraception.