By KIMBERLY DOZIER, The Associated Press

WASHINGTON -- Lawmakers who oversee U.S. intelligence agencies are working to expand the government's spying powers to allow it to continue electronically monitoring terror suspects who travel to the U.S. if they are already under surveillance overseas by the National Security Agency.

The proposal is intended to close what lawmakers describe as a brief surveillance gap that occasionally can occur because of varying legal standards between the NSA's operations, directed principally overseas, and the FBI's traditional role tracking suspects on U.S. soil. It would require changes, they said, in the Foreign Intelligence Surveillance Act.

The effort comes at an awkward time for the NSA, which has been the focus of public unease over the breadth of its spying powers as revealed by former systems analyst Edward Snowden. Court-ordered disclosures of past U.S. court rulings have also criticized the NSA for failing to comply with its own rules for collecting U.S. emails and phone records.

On Wednesday, four senators proposed a bill that would prohibit the NSA's bulk collection of every Americans' daily phone records and open up some of the actions of the FISA court, the secret federal court that reviews government surveillance requests. The government could still obtain records of anyone suspected of terrorism or espionage and of any individual in contact with a suspected terrorist or spy.

The chairwoman of the Senate Intelligence Committee, Sen. Dianne Feinstein, D-Calif., told The Associated Press that her committee is drafting a bill that would amend the law's Section 702 provision, which authorizes targeting non-Americans outside the U.S., to allow uninterrupted spying on a suspect for "a limited period of time after the NSA learns the target has traveled to the United States, so the government may obtain a court order based on probable cause."

"Logically, someone under NSA surveillance, such as a terrorist, may present more interest to the government if they are inside the United States," but the surveillance can be temporarily stopped while the NSA or FBI builds its case to permit uninterrupted spying, Feinstein said.

A congressional aide said the proposed legislation would not specify whether the NSA would be the agency that continues its surveillance or the FBI would be the agency that picks up the target. The aide was not authorized to be identified publicly and spoke on condition of anonymity.

Proposed changes to FISA are the subject of a Senate Intelligence Committee hearing scheduled Thursday. The nation's top intelligence officials, Director of National Intelligence James Clapper and Army Gen. Keith Alexander, the director of the NSA, were slated to testify.

The proposal seeking to close the surveillance gap has bipartisan support of the leaders of both House and Senate Intelligence committees.

"I call it the terrorist lottery loophole," said Rep. Mike Rogers, D-Mich., the chairman of the House Intelligence Committee. "If you can find your way from a foreign country where we have reasonable suspicion that you are ... a terrorist ... and get to the United States, under a current rule, they need to turn it off and do a complicated handoff" to the FBI.

"Bottom line is, there is a gap," said the ranking Democrat on the committee, Rep. C.A. Dutch Ruppersberger, D-Md.

"You have to get the evidence. The judge has to schedule a hearing and rule," Ruppersberger said, drawing on his own time as an FBI prosecutor building such wiretap cases. "If in that gap period, and there's an attack that kills Americans ... shame on us all."

Alexander has testified that there is no evidence of intentional wrongdoing in any of the NSA spying programs. Intelligence officials blame the thousands of errors the agency itself reported to the FISA court on a system so complex that, they have said, no single person at the NSA understood it. A compliance officer now tracks every keystroke the agency's analysts make.

In a declassified internal report from 2012, NSA tracked 2,776 compliance incidents - meaning NSA analysts made errors in surveillance. But 2,065 of those incidents were cases of these "roamers" - suspects who had been under surveillance who managed to enter the U.S. legally, or illegally.

"It's a foreign phone, it's pinging off foreign networks," Rogers said. "The suspect may turn it off. The suspect gets here. Now all of the sudden, the next thing they know, they (the NSA) are picking it up, but it's in Brooklyn. ... But they've been listening to it for two days. They have to turn it off, and then report it as an incident."

The NSA's mandate forbids it from spying on anyone inside the U.S., except in rare instances when the agency is allowed to spy on foreigners after making a case to a FISA court judge.

In most cases, it falls to the FBI to track such roaming suspects - and when the NSA calls to report a roamer, it has already stopped surveillance, and the clock has already started on the suspect's opportunity to disappear inside the U.S.

"Detect, cease," said one U.S. official, describing what the NSA does when it realizes its quarry is inside the States. The agency also has to throw out whatever it has collected - emails, phone calls or more - from the point it determines the suspect entered U.S. territory, the official said, speaking on condition of anonymity because the official was not authorized to speak publicly.

The FBI then has to decide quickly if the person is dangerous enough to start following electronically. If the suspect was, say, al-Qaida's top bomb maker, the agents would scramble to build a case showing "probable cause" to follow him. The FBI can directly contact the attorney general to ask for emergency authority to follow the suspect for seven days. The agents then have to present the government's case to the FISA court, for retroactive approval of the spying.

If the court rejects the case, the FBI has to throw out anything it's collected in that emergency period. The court has rejected surveillance requests in 11 out of more than 33,000 times.

Under Feinstein's proposal, FBI agents would not have to scramble to request permission to turn on surveillance. It would continue while the FBI built a case to present to the court.

"If the court order is not issued, all collection after the time the target is known to have entered the U.S. must be deleted," she said.

The House lawmakers want to craft a similar exception that could allow the FBI in rare cases to seamlessly pick up surveillance, especially in cases of "imminent danger" in which the NSA and FBI believe the suspect is part of a plot to kill Americans.

The FBI has traditional law enforcement techniques it can use to track the suspect, but "electronic surveillance is the most effective way to track both their movements and their communications," said another supporter of changing the law, Rep. Jim Langevin, D-R.I., a member of the House Intelligence Committee.

As they craft the exception to bridge the gap, Langevin said they would also be working to include "a process with checks and balances in there so that this authority could not be abused."

The NSA, FBI and Justice Department would not comment on the proposals.

___

Associated Press writer Donna Cassata contributed to this report.

___

Follow Dozier on Twitter at http://twitter.com/kimberlydozier

Also on HuffPost:

Loading Slideshow...
  • The sun rises behind the U.S. Capitol Dome early in the morning before the ceremonial swearing-in of President Barack Obama during the 57th Presidential Inauguration in Washington, Monday, Jan. 21, 2013. (AP Photo/Paul Sancya)

  • The Capitol dome is silhouetted as the sun rises in Washington, Monday, Oct. 15, 2012. (AP Photo/J. Scott Applewhite)

  • The moon rises behind the U.S. Capitol Dome in Washington as Congress worked into the late evening, Sunday, Dec. 30, 2012 to resolve the stalemate over the pending "fiscal cliff." (AP Photo/J. David Ake)

  • Dark clouds surround the Capitol dome on Capitol Hill in Washington, Friday, June 1, 2012, as severe weather comes to the area. (AP Photo/Alex Brandon)

  • The U.S. Capitol dome is seen on December on 17, 2010 in Washington, D.C. (KAREN BLEIER/AFP/Getty Images)

  • The dome of the Capitol is reflected in a skylight of the Capitol Visitor's Center in Washington, Tuesday, Jan. 1, 2013. (AP Photo/Jacquelyn Martin)

  • Storm clouds fill the sky over the U.S. Capitol Building, June 13, 2013 in Washington, D.C. (Photo by Mark Wilson/Getty Images)

  • Law enforcement officers line up on the lawn on the east side of the U.S. Capitol during the 32nd annual National Peace Officers' Memorial Service at the U.S. Capitol May 15, 2013 in Washington, D.C. (Photo by Chip Somodevilla/Getty Images)

  • Storm clouds fill the sky over the U.S. Capitol Building, June 13, 2013 in Washington, D.C. (Photo by Mark Wilson/Getty Images)

  • A U.S. flag flies at half staff on the U.S. Capitol April 15, 2013 on Capitol Hill in Washington, D.C. (Photo by Alex Wong/Getty Images)

  • The U.S. Capitol dome and Christmas tree are seen December 18, 2011 in Washington. (KAREN BLEIER/AFP/Getty Images)

  • A view of the U.S. Capitol's rotunda and a TV truck's satellite dish before the State of the Union address on Capitol Hill January 25, 2011 in Washington, D.C. (Photo by Brendan Smialowski/Getty Images)

  • A flag flies at half-mast over the dome of the U.S. Capitol in Washington, D.C., January 10, 2011, in honor of the six people killed in the shooting in Tucson, Arizona, that also severely wounded Arizona Representative Gabrielle Giffords. SAUL LOEB/AFP/Getty Images)

  • A Christmas after being lit by U.S. House Speaker Nancy Pelosi, D-Calif, is pictured before the Capitol Hill dome in Washington on December 7, 2010. (JEWEL SAMAD/AFP/Getty Images)

  • The Capitol Dome is seen during a rehearsal for the Inauguration Ceremony January 11, 2009. (PAUL J. RICHARDS/AFP/Getty Images)

  • The U.S. flag flies in front of the US Capitol dome on December 24, 2008 in Washington, D.C. (KAREN BLEIER/AFP/Getty Images)

  • The dome of the U.S. Capitol is seen at dusk on December 9, 2008 in Washington, D.C. (KAREN BLEIER/AFP/Getty Images)

  • The Capitol dome is seen silhouetted against the rising sun in Washington, DC, on February 1, 2010. (JEWEL SAMAD/AFP/Getty Images)

  • The illuminated Capitol Dome is pictured late November 21, 2008 in Washington, D.C. (PAUL J. RICHARDS/AFP/Getty Images)

  • The dome of the U.S. Capitol is seen in Washington, D.C. on September 20, 2008. (KAREN BLEIER/AFP/Getty Images)