A controversial provision in U.S. law that gives the National Security Agency broad authority to spy on people overseas expires at the end of the year, and six major tech trade groups are gearing up for a fight over an extension.

Section 702 of the Foreign Intelligence Surveillance Act expires on Dec. 31, and Congress almost certain to extend it in some form.

The tech trade groups, including BSA, the Consumer Technology Association, and the Computer and Communications Industry Association, are asking lawmakers to build in new privacy protections for internet users.

"It is critical that Congress takes a balanced yet focused approach with respect to Section 702," the groups said in a letter sent to top lawmakers Wednesday. "We urge your committees to ensure that any reauthorization includes meaningful safeguards for internet users' privacy and civil liberties."

Section 702 of FISA allows the NSA to spy on the communications, including internet traffic, of people living outside the U.S. and, in some cases, their communications to people living inside the country. FISA served as the authority for the NSA's Prism internet surveillance and other programs revealed by NSA leaker Edward Snowden.

The trade groups didn't offer specific recommendations for privacy and civil liberties protections, although they called on Congress to hold a public debate on an extension of the provision.

The position of the tech trade groups differs from many digital rights groups, who want Congress to either make major changes to the provision or scrap it.

"Section 702 of FISA has allowed for mass surveillance programs ... that have been used by the U.S. government to warrantlessly collect and search the Internet communications of people all over the world," the End 207 coalition said. "Absent a full reform," Section 702 should be allowed to expire.

The NSA and other U.S. intelligence agencies have defended FISA as essential to protect the U.S. from terrorism and other security threats. NSA surveillance has helped to thwart dozens of terrorism plots, Matthew Olsen, an executive with IronNet Cybersecurity and former director of the National Counterterrorism Center, said during a hearing last May.

The surveillance programs are "vital to our security," Olsen said then. The programs allow the U.S. government to "obtain critical intelligence about terrorists and other targets that it simply could not obtain by other means."