President Trump's decision to ban transgender individuals from serving in the military highlights recent votes on a related issue by two Republican members of Congress from Virginia whose districts are being targeted by Democrats in 2018.
They took opposite stances on a measure that would have blocked an Obama-era practice requiring Pentagon to pay for gender transition surgeries and hormone therapy.
The so-called Hartzler amendment - named after the lawmaker, Rep. Vicky Hartzler (R-Mo.) who proposed adding it to the annual defense policy bill - failed by a vote of 214-209.
Rep. Barbara Comstock (R) of Northern Virginia was among the 24 Republicans who joined all Democrats in voting against the amendment.
"Congresswoman Comstock's vote on this issue reflected her view that [Defense] Secretary [Jim] Mattis, and the professionals at the Defense Department are best equipped to define these policies," her spokesman, Jeff Marschner, said in a statement. "The congresswoman trusts that Secretary Mattis will provide the clarity and details on what is in the best interest of military readiness going forward."
Rep. Scott Taylor (R), a freshman from Virginia Beach, voted for the amendment, despite a record of supporting LGBT causes through legislation and statements.
Taylor said Trump's ban, announced Wednesday via Twitter, is premature because the Department of Defense is in the midst of a review of its policies addressing transgender members of the military.
"There are heroic military members willing to put their lives on the line and give the ultimate sacrifice on our behalf, regardless of their gender identity," he said in a statement.
He said he voted for the Hartzler amendment "on the basis of individual medical readiness." A spokesman did not respond to requests for clarification.
Nationally, Democrats hoping to capitalize on Trump's low approval ratings in Virginia's urban regions consider both Comstock and Taylor's districts possible pick-up opportunities. Multiple Democrats are vying for the nominations to challenge them both.
They say Comstock, whose district voted for Hillary Clinton over Trump by 10 points, is out of step with moderate voters in Loudoun County, in the heart of the district. She has at times criticized Trump and voted against the House Republican health-care bill.
Trump won by 3 points in Taylor's district, which has for brief periods been represented by a Democrat.
Trump said in a series of tweets that the government "will not accept or allow transgender individuals to serve in any capacity in the U.S. Military."
He added, "Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail. Thank you."
Taylor, a former Navy SEAL and defense hawk who supports Trump, has backed LGBT rights. In the state General Assembly, he sponsored a bill that would have banned LGBT discrimination in housing. Within two months of joining Congress, he introduced similar federal legislation.
Last month he won praise from the Human Rights Campaign as one of two House Republicans - among 238 - to support a federal ban on LGBT discrimination.
Vivian Wise, a transgender woman and Navy officer who works in off-ship communications and lives in Virginia Beach, said the ban leaves her wondering if she should search for a new job and place to live.
She said considers Taylor's vote for the Hatzler amendment an example of "naked bigotry and a backlash against progress the transgender community has made in recent decades."
"Frankly I wasn't surprised at all," she said. "Representative Taylor is something of a water carrier for his party. He seems to be someone who will go along with the majority."
James Parrish, executive director of Equality Virginia, said the fact that Republican support helped kill the Hartzler amendment proves advocacy efforts on behalf of the transgender community are working.
"These are patriotic Americans who are putting their lives on the line to protect our country and preserve our freedoms and there should be no question about whether they should have the same benefits that all active duty members of the military and veterans have," he said.
Democrats in Congress and across Virginia criticized the ban. Gubernatorial candidate Ralph Northam, a former Army combat medic and graduate of the Virginia Military Institute, tweeted:
"Anyone who wants to serve our country in the military should be welcomed. They're patriots and should be treated as such."
Danica Roem (D), a transgender woman who is challenging incumbent Del. Robert G. Marhsall (R) for a statehouse seat representing Prince William County, posted a series of tweets, including: "Transgender military members like Logan Ireland & Laila Villanueva have done more to serve & protect America than Donald Trump ever will."
Aides to Ed Gillespie, the Republican gubernatorial nominee, did not respond to a request for comment on the president's announcement.
Fenit Nirappil contributed to this report.