Gabriel Gomez speaks to the press in Copley Square as former New York City Mayor Rudy Giuliani listens, Thursday, June 6, 2013. (Jesse Costa/WBUR)

The two Massachusetts U.S. Senate candidates have different reactions to revelations that the National Security Agency is tracking the phone calls of millions of Americans and collecting data from the servers of nine U.S. tech companies.

Republican Gabriel Gomez is willing to cut President Obama some slack for the surveillance.

"I'll give them the benefit of the doubt right now, but I assume that this has risen to an imminent threat or to some serious national security threat right now," Gomez told reporters in South Boston Friday afternoon.

But Gomez said he understands why people are suspicious of the NSA collection of phone and Internet records. He said:

You've got the IRS targeting groups because of political beliefs. You've got the Justice Department seizing records. You still don't have any answers on Benghazi, and then something like this comes up. It just shows you just how distrustful people are of D.C., and there's a reason for that. It's because it's broken, and everything down in D.C. is effectively tainted in my eyes. So, they got a higher bar to clear because of the reputation down in D.C.

The candidate who is more critical of the NSA's monitoring of phone calls and Internet use is the Democrat, Ed Markey. In Congress, he has pushed for standards to protect innocent people from surveillance by the government.

"As they're looking for the guilty needle, they gather an innocent haystack of millions of Americans' information, and we have to make sure that all of that information is protected," Markey told reporters in East Boston Friday. "We have to make sure there is no compromise of the privacy, of the security of ordinary American families, who are no security risk in our country. That's why I vote no any of these programs which do not require a warrant."

Markey voted against reauthorizing the Patriot Act in 2005, 2010 and 2011. And he voted against reauthorizing the Foreign Intelligence Security Act last year. That's the law that set up the secret court that allowed the surveillance of tens of millions of Verizon customers.

But Markey declined to criticize Obama for the surveillance.