A group of Virginia Republicans tried but failed to censure a GOP congressman for what they considered a failure to uphold the party's values by officiating a gay couple's wedding.

The Roanoke Times reported that the 5th Congressional District Republican Committee held a closed session Saturday to discuss reprimanding Rep. Denver Riggleman.

Committee member Wendell Johnson introduced a motion to express formal disapproval of Riggleman's act for "failing to uphold the Republican Party platform" on same-sex marriage.

The committee chairman, Melvin Adams, said the motion was out of order. Committee member Diana Shores motioned to overrule Adams, but only four people voted in favor, so the motion and censure effort failed.

In a statement Monday, a spokesman said Riggleman was "happy to officiate" the same-sex ceremony.

“Congressman Riggleman participated in a wedding for two of his friends and campaign volunteers who asked him to officiate. The Congressman was happy to officiate their wedding and he is proud of these two young people who found their life partner," Joe Chelak, communications director for Riggleman, told NBC News. "Congressman Riggleman has full confidence in the district committee and applauds their decision to continue to make the Republican Party an inclusive party of liberty and freedom for everyone."

Soon after the censure vote, Adams posted a statement on the committee website titled "5th District GOP Committed to Inclusiveness," which said, "As a party we do not discriminate against anyone and all are welcome to join us to promote our party platform and support our candidates."

He then affirmed that the 5th District is "absolutely committed to our Party Platform" and proceeded to quote from the official 2016 Republican Platform, which touts "traditional marriage" and states, "Children raised in a two-parent household tend to be physically and emotionally healthier, more likely to do well in school, less likely to use drugs and alcohol, engage in crime or become pregnant outside of marriage."

The quoted paragraphs include the endorsement of several anti-LGBTQ elements of the Republican Platform, including measures that "recognize marriage as the union of one man and one woman" and those that permit religiously based refusals to serve LGBTQ people.

"[W]e do not accept the Supreme Court’s redefinition of marriage and we urge its reversal, whether through judicial reconsideration or a constitutional amendment returning control over marriage to the states," Adams' statement quoting the Republican Platform reads. "We oppose government discrimination against businesses or entities which decline to sell items or services to individuals for activities that go against their religious views about such activities."

Follow NBC Out on Twitter, Facebook & Instagram