A clerk's office in Virginia has ended a five-year policy of denying journalists access to any legal motions filed in the court after the rule was challenged by The Associated Press.

The policy had been in place since 2011 in the Prince William County General District Court, according to a one-page memo provided Wednesday. The memo was produced in response to a request from an AP reporter seeking to review motions filed in the capital murder case against a man accused of gunning down a police officer on her very first shift last month.

A supervisor in the office explained that members of the general public can read the files but reporters cannot because "we know you'd write about them."

On Thursday, after a reporter called seeking comment on the policy for a news article, the office's chief clerk, Jacqueline Ward, said the policy had been implemented at the behest of a now-retired judge, Wenda Travers. The current chief judge, William Jarvis, instructed the clerk's office to rescind the rule after learning about the dispute.

Neither Travers nor Jarvis returned calls seeking comment Thursday.

Megan Rhyne, director of the Virginia Coalition for Open Government, said she had never heard of a court clerk issuing a blanket policy denying court records to journalists.

"Wow," she said. "They can't make a blanket prohibition. They cannot pick and choose who gets to see public records. I'm just astounded."

The General District Court is just one of three courts operating in the county courthouse, along with the Circuit Court and the Juvenile and Domestic Relations Court. The General District court handles minor criminal matters, and only handles major felonies in their preliminary stages. Legal motions are not filed very often at these early stages of a case, so there may not have been many opportunities for the policy to have been challenged.

The circuit court clerk allows reporters and anyone else access to any motions filed, unless they have been explicitly sealed.

In General District Court, though, before Thursday's change journalists were allowed only to see the initial charging document filed in a case. Any motions as the case proceeded were off-limits. Clerks in the office typically ask people seeking to review files whether they are a lawyer or a party with an interest in the case, so members of the news media usually identify themselves as such when making a request.

The motions obtained Thursday in the capital murder case against Ronald Hamilton of Woodbridge include requests from Hamilton's lawyer for a gag order in the case, which has received national attention, and a motion seeking to protect the privacy of Hamilton's personal records.

Hamilton is charged with shooting and killing his wife, Crystal Hamilton, in a domestic dispute in their home, then shooting three police officers who responded to Crystal Hamilton's 911 call for help. Officer Ashley Guindon, working her first shift after being sworn in the previous day, was shot and killed. Two other officers, Jesse Hempen and David McKeown, were wounded.

A hearing on the motions is scheduled for Tuesday.