The US military has said it will stop selling adult magazines such as Playboy and Penthouse in Army and Air Force Exchange Service (AAFES) stores.

The Department of Defense confirmed they will be removing 48 "adult sophisticate titles" from the exchanges, a combination of shopping centre and convenience stores found on military bases, after years of protests.

However, the decision to remove the magazines was not based on morality, but merely because the magazines were not selling, as people now get their pornography online.

Army Lt. Col. Antwan C. Williams, an AAFES spokesman, said: "The decision to no longer stock the material is a business decision driven by the time, money and energy required to facilitate buying habits, combined with decreasing demand.

"Like their civilian counterparts, exchange shoppers' increased reliance on digital devices to access content virtually has resulted in a sustained decrease in demand for printed magazines.

"Magazine sales are on a sustained downward trajectory due to the proliferation of digital delivery."

AAFES said it was permanently removing 891 magazines from its stock, including SpongeBob Comics and the Home Buyers Guide, as well as adult magazines such as Playboy, to make space for faster-moving electronic product ranges.

Removing the magaines will create 33% more space in the stores to sell items such as DVDs and video games.

According to AAFES, sales of adult magazines have declined 86% since 1998 and 18% from 2011 to 2012.

Anti-porn groups have been campaigning for years for magazines such as Playboy and Penthouse to be removed from military bases.

One group, Morality in the Media, complained in June that selling the magazines violated the Military Honour and Decency Act of 1996, which forbids military bases from selling "sexually explicit" material.

The act defines this as a film or image which "depicts or describes nudity" or sexual activities "in a lascivious way".

According to the Defense Department, the adult magazines were allowed to be sold as they did not meet the definition of indecent material under federal law.

They did not fully explain why Playboy or Penthouse do not fit the "sexually explicit" description, but told Morality in the Media that: "The Resale Activities Board of Review previously reviewed the publications cited in your letter and determined that, based on the totality of each magazine's content, they were not sexually explicit under the definition in section 2495b(e)."

Morality in the Media executive director Dawn Hawkins described the decision to pull the magazines as "a great victory".