A majority of Americans, including those who live in military households, believe that transgender people should be allowed to serve in the armed forces, according to a new poll out Thursday.

The survey of registered voters found that 68 percent overall were in favor and 27 percent opposed, the Quinnipiac survey showed.

Among military families, 55 percent were in favor while 39 percent were opposed.

Republicans opposed transgender service by 60 percent to 32 percent, but every other party, gender, education, age or racial group backed transgender service by margins of 22 percentage points or higher, the poll found.

More acceptance of transgender people would be “a good thing for the country,” according to 46 percent of voters, while 14 percent say it would be “a bad thing” and 39 percent say it would not make much difference.

“They put on uniforms and face the same risks as their brothers and sisters in arms for little reward other than protecting their country,” said Tim Malloy, assistant director of the Quinnipiac University Poll.

“Voters say a soldier is a soldier, no matter what his/her gender identity is. Voters say, ‘Let them serve.’ “

President Trump last week abruptly announced on Twitter that transgender people would be barred from serving in the military in any capacity — a move that caught the Pentagon off-guard.

Military brass said later there was no change in their policy despite Trump’s tweets, which were reportedly a gift to conservative GOP lawmakers who were threatening to hold up a spending bill that could pay for his border wall and other priorities.