Rep. Scott W. Taylor (R-Va.) is a new co-sponsor of the Equality Act, which would add sexual orientation and gender identity to federal civil rights laws. (Steve Earley/Virginian-Pilot via AP)

Rep. Scott W. Taylor, a Republican from Virginia Beach, just became the second House Republican — among 238 — to support a federal ban on LGBT discrimination, reflecting a shift in public opinion on the issue in Virginia and the nation.

The Human Rights Campaign announced last week that Taylor was the newest co-sponsor of the Equality Act, which, if passed, would add sexual orientation and gender identity to existing federal civil rights statutes.

The other Republican co-sponsor, Rep. Ileana Ros-Lehtinen (Fla.), is not seeking reelection next year.

Among Democrats in Congress, the opposite disparity exists, with almost all members supporting the legislation, except moderates Joe Manchin III (W.Va.) and Joe Donnelly (Ind.) in the Senate and Marcia L. Fudge (Ohio) and Daniel Lipinski (Ill.) in the House.

David Stacy, a lobbyist for the Human Rights Campaign, which advocates for gay rights, said Taylor, a 37-year-old freshman House member and former Navy SEAL, is a natural fit for the legislation.

Meet the candidates running to become Virginia’s next governor

“It didn’t take a big sales job because he understood right away that this was the right thing to do,” Stacy said. “It was broadly supported across the state and in his district.”

Taylor, a foreign policy hawk who supports President Trump, represents a district that relies on tourism and has marketed itself as an ideal vacation spot for the gay, lesbian, bisexual and transgender community.

As a delegate in the state General Assembly, Taylor was a primary supporter of a bill introduced by Del. Marcus B. Simon (D-Fairfax), who represents a liberal Northern Virginia district, that would have banned LGBT discrimination in housing.

Once in the U.S. House, Taylor introduced a similar bill, which has 12 co-sponsors — six Republicans and six Democrats.

“I think this is the right thing to do,” Taylor said when the bill was introduced this spring. “We haven’t polled it, so I have no idea if it’s a net negative or a net positive in the district.”

His district is also home to many active-duty and retired military personnel, who, polls show, tend to be open-minded on social issues.

For Taylor, supporting LGBT rights is a “political winner,” Stacy said.

But the Equality Act is unlikely to go to a floor vote in the GOP-controlled House because Republican leadership would be reluctant to force lawmakers vulnerable to challenges from the right to go on record on an issue that animates social conservatives.

That helps explain why Rep. Barbara Comstock (R-Va.), who represents a Northern Virginia district that favored Hillary Clinton by 10 points last year, has a “zero” rating from the Human Rights Campaign.

But Mark J. Rozell, dean of the Schar School of Policy and Government at George Mason University, said the mere introduction of LGBT rights bills is indicative of how much social attitudes have changed in the past decade.

When he wrote the 1996 book “Second Coming: The New Christian Right in Virginia Politics,” Rozell said, “it wasn’t even conceivable that we would have a conversation like this right now.”

“It’s the older generation holding on more strongly to the traditional social views,” he said. “For the younger generation, they don’t even understand why this is an issue.”