The U.S. Naval Academy will ban transgender people from attending the school starting with the 2020 school year following a Pentagon policy that took effect last week.

While the academy currently accepts transgender students and retains midshipmen who transition during their education, the Defense Department on Monday confirmed the change to the Capital Gazette newspaper in Annapolis.

The Trump administration's restrictions were implemented Friday after multiple legal challenges. The directive bans transgender troops from serving openly and denies medical care for gender transition, reversing an Obama-era policy. About 14,700 troops identify as transgender.

Directive:Pentagon transgender troop policy takes effect, what to know

'Mob violence':Dallas police investigating assault of transgender woman as potential hate crime

A U.S. Coast Guard Academy spokesman confirmed the school also follows the Trump administration's ban. Previous medical treatment such as hormone therapy or gender-affirming surgery may disqualify future applicants, according to the Coast Guard website.

The nation's other service academies — the U.S. Air Force Academy, the U.S. Military Academy and the U.S. Merchant Marine Academy — have not announced plans related to the ban.

An organization representing transgender service members said several attend each academy, although many are not openly transgender.

“The policy turns off access to some of our best and brightest, and that’s not what our country needs to win future wars,” said B Fram, communications director for Service Members, Partners and Allies for Respect and Tolerance for All, or SPARTA.

The Pentagon's directive also bars future applicants who have been diagnosed with gender dysphoria, a discomfort or distress caused by a discrepancy between a person’s gender identity and sex assigned at birth.

Under the policy, troops diagnosed with gender dysphoria will be medically evaluated before they are discharged to see if they qualify for disability. If not, gender dysphoria can be considered a “condition that interferes with military service” like sleepwalking and motion sickness.

The American Medical Association has blasted the policy, saying the wording mischaracterizes transgender people as having a “deficiency.” The association recognizes treatment for gender dysphoria as medically necessary.

Contributing: The Associated Press