U.S. Naval Academy quarterback Keenan Reynolds warms up before the start of a football game against Memphis in Tennessee. (Mark Humphrey/Associated Press)

Defense Secretary Jim Mattis has rescinded a Defense Department policy that allowed some of the best athletes from the military’s service academies to avoid active-duty service after graduating in order to pursue professional sports, the Pentagon said Monday.

The new policy will again require all athletes to serve at least two years on active duty if they attend a service academy. Mattis said in a memo that the academies “exist to develop future officers who enhance the readiness and lethality of our Military Services,” and athletes won’t be granted exceptions anymore.

“During their first two years following graduation, officers will serve as full-fledged military officers carrying out the normal work and career expectations of an officer who has received the extraordinary benefits of an ROTC or military academy education at taxpayer expense,” Mattis wrote, referring to the Reserve Officers’ Training Corps program that trains college students to join the military.

The policy will not apply to athletes who recently graduated, such as Keenan Reynolds of the Naval Academy. Last year, he was allowed to become a Navy reservist immediately after graduating from the school so that he could pursue a professional football career. He was on the roster of the National Football League’s Baltimore Ravens last fall.

A Pentagon spokeswoman, Dana White, said in a statement that the Defense Department has a “long history of officer athletes who served their nation before going to the pros,” citing Roger Staubach, a former Navy quarterback who starred for the Dallas Cowboys, Chad Hennings, who played for the Air Force Academy and the Cowboys, and David Robinson, who played basketball for Navy and went on to play professionally for the San Antonio Spurs after fulfilling his service commitment.

The Pentagon strictly adhered to its service requirements for athletes for years, but the practice began to change in 2005 with a Military Academy policy that allowed cadets with “unique talents and abilities” to pursue atypical ways to meet their service requirements.

The door was thrown wide open last summer, when then-Navy Secretary Ray Mabus said “we can work something out” to accommodate Reynolds, and the Defense Department soon amended its policy for all the services.