By EILEEN SULLIVAN, Associated Press

WASHINGTON (AP) — Two days before Donald Trump takes office, the CIA on Wednesday published for the first time its guidelines for how it collects, stores, searches and shares information about Americans. New rules put limits on those who can search it and require they give a reason.

While some of the policies haven't been updated since 1982, others have been changed, reflecting radical developments in technology over the past three decades and the CIA's effort to be more transparent and protect Americans' privacy and civil liberties, the spy agency said. The changes will go into effect on March 18.

The revised, unclassified guidelines have been in the works for years, CIA General Counsel Caroline Krass said. But the timing of the announcement, shortly before Trump's inauguration, suggests officials prioritized their completion before President Barack Obama left office. The incoming Trump administration could undo the changes, though doing so would likely be a complicated and time-consuming process.

"This is a significant step for us," Krass told reporters.

The CIA operates under a 1981 presidential order that is not overseen by the U.S. courts. The agency focuses its spying outside the U.S., but sometimes it inadvertently collects information on Americans.

The new guidelines impose a five-year time limit for how long the agency can hold onto certain information on Americans that has not been reviewed or evaluated. There is also a new 25-year time limit for when it has to purge routine information, such as foreign business records, that have not been reviewed.

Also new: policies regulating which employees can access this type of information, and a system that creates a digital trail of all who search for such data and why. These activities will be subject to occasional audits, the agency said.

"These rules lack basic privacy protections for Americans. They allow the CIA to collect communications in bulk, to retain that information in CIA databases for years, and to comb through it for the personal data of individual Americans," said Patrick Toomey, an attorney with the American Civil Liberties Union, which has been critical of the U.S. intelligence agencies' collection authorities and oversight. "History shows that warrantless surveillance powers can easily be abused, and these procedures do not go nearly far enough."

Parts of the previous guidelines were released in 2015 in response to a public records request, though some sections were blacked out for security reasons. This is the first time the agency has made all of its guidelines visible to the public.

Advancements in technology mean there is more "incidental" collection of Americans' communications, said Ben Huebner, the CIA's privacy and civil liberties officer. The CIA can collect so much information at a time that it is sometimes impossible to review all information quickly.

Trump has said he wants to expand U.S. surveillance authorities to fight terrorism.

"But it is not as easy as snapping the fingers or a stroke of the pen," said Susan Hennessey, a fellow at the Brookings Institution who formerly worked in the National Security Agency's general counsel's office. "It is a much more complex process."

Attorney General Loretta Lynch signed the new guidelines Tuesday. CIA Director John Brennan signed them Jan. 10.