Del. Mark Sickles (D-Fairfax) delivered an emotional speech on a bill relating to religious objections to same-sex marriages. (Steve Helber/AP)

Del. Mark D. ­Sickles’s hands shook and tears filled his eyes as he pleaded for fairness from colleagues, who shifted nervously in their seats.

“Your kids will be looking back on what you do today and how you vote on this bill,” the gay Democrat from Fairfax told them as he stood on the floor of the House of Delegates.

After an intense debate, the ­Republican-controlled House passed a bill Tuesday that would prevent the government from punishing discrimination against married same-sex couples, transgender individuals and people who have sex outside of marriage.

But the vote hinted at a generation gap within the Republican Party on gay rights issues. In Virginia, all but two of the 10 Republican lawmakers who voted “no” or sat out a vote on the “Government Nondiscrimination Act” are younger than 53, the median age in the House.

“There’s a generational divide in terms of acceptance of the LGBT community being part of the norm. I understand that’s maybe changing quickly for ­people, but that’s the society we live in,” said Del. Scott W. Taylor (R-Virginia Beach), 36, who is running for Congress.

Even though the Republican rebellion was small in number, it was significant for a caucus usually in lockstep on issues important to the GOP base. Democrats, who all voted against the bill regardless of age, seized on the moment as evidence that social conservatives are out of step with public opinion.

In a statewide poll released last week by Christopher Newport University, a majority of Virginians said businesses should not be able to refuse service to gays and lesbians based on religious beliefs.

Among Republican lawmakers who voted on the side of gay rights, most represent the Virginia Beach area, which heavily relies on tourism dollars; the rest hailed from Richmond and Southwest Virginia. Republicans from Northern Virginia voted for the bill.

Former Virginia governor and former U.S. senator George Allen, once a staunch opponent of same-sex marriage, said he changed his mind after seeing young people embrace diversity when it comes to sexual orientation. Today, the 63-year-old Republican said he believes in equal opportunity, including gay rights.

“Young people are growing up in a different world than I grew up in,” he said in an interview. “And so to them, someone’s sexual orientation doesn’t affect them one way or another. Even conservative young people, it’s just not an issue for them.”

Polling data supports the view that younger Republicans are generally more supportive of same-sex marriage than their elders.

After the U.S. Supreme Court affirmed the right to same-sex marriage in all 50 states last summer, 55 percent of Republicans and ­Republican-leaning independents younger than 40 approved of the ruling, a national Washington Post-ABC News survey found.

But as the age of those surveyed increased, support for the ruling decreased: 31 percent of people ages 40 to 64 approved of legalizing gay marriage. And the percentage fell among those 65 and older to 25 percent .

In his speech before Tuesday’s vote, Sickles made the case that corporations powering Virginia’s economy have decided embracing gay rights is good for business.

In response, Del. C. Todd Gilbert (R-Shenandoah) said none of that matters when deeply held religious beliefs are under attack by shifting cultural attitudes.

“The activists who pursue same-sex marriage,” he said, “they are not satisfied with equality and they will not be satisfied until people of faith are driven out of this discourse, are made to cower, are made to be in fear of speaking their minds, of living up to their deeply held religious beliefs. They want us driven out.”

Gilbert, 45, is among the 20 relatively young Republicans who voted for the bill, but observers of the dynamic in the conservative House say a growing number of young Republicans are beginning to diverge on gay rights issues.

“On issues such as gay rights, the demographic trends are pointing in a direction decidedly against the conservative positions, yet the older-generation leadership of the party is still wedded to the former consensus,” said Mark J. Rozell, dean of the School of Policy, Government and International Affairs at George Mason University. “The Republicans frankly haven’t figured it out yet.”

At least one Republican delegate who voted “no” said he was prepared to vote for Gilbert’s bill, but said Sickles’s floor speech changed his mind.

“When you look at some of the folks who voted ‘no,’ we view this as what the ’60s and ’70s went through with civil rights. It’s almost the same thing,” said Ronald A. Villanueva (R-Virginia Beach), who is 45.

Dissent is unusual in a chamber controlled by Speaker William J. Howell (R-Stafford), 72, but his spokesman said divergent views are tolerated.

“Republicans in the House of Delegates all bring different experiences and perspectives to the General Assembly, and they all represent unique communities in a big and diverse state,” Matt Moran said. “The House is unified, but there are still a variety of viewpoints on many issues.” That is integral to the success of a legislative body.”

Taylor and Villanueva sponsored bills with Democrats in the House this year that would have banned discrimination on the basis of sexual orientation and gender identity in the workplace and in housing. Those bills never got a vote in committee.

But in the more moderate Senate, identical bills sailed out of committee to full floor votes and passage with the support of five Republicans, including state Sen. Jill Holtzman Vogel (R-Fauquier), who is 45.

Bottom line is the commonwealth of Virginia should not be allowed to discriminate,” she said. “Period. Full stop. In my mind, that is not a close call.”

Correction: An earlier version of this story incorrectly stated the correlation between age and the approval rate of same-sex marriage. The older the surveyed group was, the less likely it would be that they supported gay rights.

Scott Clement contributed to this report.