WASHINGTON - The National Security Agency considered abandoning its secret program to collect and store American calling records in the months before leaker Edward Snowden revealed the practice, current and former intelligence officials say, because some officials believed the costs outweighed the meager counterterrorism benefits.

After the leak and the collective surprise around the world, NSA leaders strongly defended the phone-records program to Congress and the public, but without disclosing the internal debate.

The proposal to kill the program was circulating among top managers but had not yet reached the desk of Gen. Keith Alexander, then the NSA director, according to current and former intelligence officials who would not be quoted because the details are sensitive. Two former senior NSA officials say they doubt Alexander would have approved it.

Still, the behind-the-scenes NSA concerns, which have not been reported previously, could be relevant as Congress decides whether to renew or modify the phone records collection when the law authorizing it expires in June.

The internal critics pointed out that the already high costs of vacuuming up and storing the "to and from" information from nearly every domestic landline call were rising, the system was not capturing most cellphone calls, and the program was not central to unraveling terrorist plots, the officials said. They worried about public outrage if the program ever was revealed.

After the program was disclosed, civil liberties advocates attacked it, saying the records could give a secret intelligence agency a road map to Americans' private activities. NSA officials presented a forceful rebuttal that helped shaped public opinion.

Responding to widespread criticism, President Obama in January 2014 proposed that the NSA stop collecting the records, but request them when needed in terrorism investigations from telephone companies, which tend to keep them for 18 months.

Yet the president has insisted that legislation is required to adopt his proposal, and Congress has not acted. So the NSA continues to collect and store records of private U.S. phone calls for use in terrorism investigations. Many lawmakers want the program to continue as is. Alexander argued that the program is an essential tool because it allows the FBI and the NSA to hunt for domestic plots by searching American calling records against phone numbers associated with international terrorists.

Civil liberties activists say it was never a good idea to allow a secret intelligence agency to store records of Americans' private phone calls.