WASHINGTON — The US Marine Corps said Wednesday it will close a prison in Virginia that came under criticism for its treatment of a soldier accused of passing secrets to WikiLeaks.

The commander of the Marine base at Quantico has recommended "that the pre-trial confinement facility be closed" as a cost-saving measure, the Marine Corps said in a statement.

A military spokesman said the move was not related to the case of Bradley Manning, the 23-year-old US Army intelligence analyst who allegedly handed over a trove of classified documents to the WikiLeaks website.

Major Stewart Upton told AFP that "the recommendation was made after balancing the cost of continued operation against the convenience of having such a facility aboard MCB (Marine Corps Base) Quantico, the low number of detainees, personnel savings, base security, and anti-terrorism and force protection interests."

Human rights groups had accused the military of imposing harsh conditions on Manning at Quantico even though he has yet to go to trial on charges of "aiding the enemy" and divulging secret government documents.

In April, Manning -- who had been held in solitary confinement at Quantico and denied regular sheets and blankets -- was transferred to a prison at Fort Leavenworth, Kansas where he will face less strict conditions.

The brig at Quantico has held other high-profile suspects since it was built in 1972, including John Hinckley Jr. who was accused of attempting to assassinate president Ronald Reagan in March 1981. He was found not guilty for reasons of insanity.

Another inmate at the Quantico brig was Clayton Lonetree, a Marine security guard in Moscow who was convicted of espionage in 1987.

In the future, detainees could be held at other military prisons in Virginia or at civilian detention centers, the Marine Corps said.