WASHINGTON (AP) -- The U.S. House overwhelmingly approved legislation Tuesday to protect same-sex and interracial marriages amid concerns that the Supreme Court ruling overturning Roe v. Wade abortion access could jeopardize other rights criticized by many conservatives.

In a robust but lopsided debate, Democrats argued intensely and often personally in favor of enshrining marriage equality in federal law, while Republicans steered clear of openly rejecting gay marriage. Instead, leading Republicans portrayed the bill as unnecessary amid other issues facing the nation.

Tuesday’s election-year roll call, 267-157, was partly political strategy, forcing all House members, Republicans and Democrats, to go on the record. It also reflected the legislative branch pushing back against an aggressive court that has raised questions about revisiting other apparently settled U.S. laws.

Wary of political fallout, GOP leaders did not press their members to hold the party line against the bill, aides said.

In all, 47 Republicans joined all Democrats in voting for passage.