An old recruiting slogan for the Navy used to begin, “It’s not just a job …” and nothing could be truer about service in America’s armed forces.

Ordinary jobs don’t demand that you be willing to die for your country, but the military does, and everyone who serves has made that commitment.

The future of thousands of those men and women has been thrown into chaos by their commander in chief, who wants to reject their sacrifice because of their gender identity.

In a series of tweets and an executive order, President Trump has begun a process that could ban otherwise qualified people from serving their country. He is playing to an audience of Americans who are uncomfortable with the pace of change regarding transgender rights. His stand might be good politics, but it would be a serious mistake.

The military has an obligation to assemble the best fighting force that it can, and it won’t achieve that by arbitrarily rejecting talent.

The most important qualification for military service should be the one that makes it more than a job – the willingness to die for your country. Everything else pales in comparison.

Defense Secretary James Mattis has announced that he is assembling a panel that will prepare a recommendation for the president on how best to keep transgender men and women out of the service, in compliance with Trump’s order of Aug. 25.

In it the president said that the ban would go in effect, unless Mattis can convince him that it’s a bad idea.

Fortunately, the president will not have the last word.

The ACLU has filed a lawsuit on behalf of transgender service members who would be affected by the change in policy.

The suit calls on the courts to find that Trump cannot refuse to allow people to serve their country simply because they identify with a gender that is different than the one that was assigned to them at birth.

The notion of transgender people in the military is fairly new, but it follows a series of developments involving the status of women, as well as lesbian and gay service members that challenge traditional beliefs that don’t impact performance.

Leaders in the armed forces have been able to apply objective criteria that can apply to all service members and recruits without discriminating based on gender or sexual orientation.

Last year, former Defense Secretary Ash Carter issued rules that permitted openly transgender men and women to serve, finding that there was no reason to exclude them on that basis alone.

There are still reasons that the government can legitimately exclude people from serving. Recruits have to pass intelligence and physical fitness tests. A serious criminal history is also disqualifying.

And the military can demand that service members abide by codes of conduct, that can lead to discharge if not followed.

But if transgender people can meet those standards, they should be allowed to serve. Rather than rejection, they deserve the nation’s thanks.