RIO DE JANEIRO (AP) — Brazilians were outraged when they learned their country was a top target of the U.S. National Security Agency's overseas spying operation, with data from billions of calls and emails swept up in Washington's top secret surveillance program.

Yet when it comes to the cloak and dagger effort of catching philandering lovers, all high-tech weapons appear to be fair game — at least to the tens of thousands of Brazilians who downloaded "Boyfriend Tracker" to their smartphones before the stealthy software was removed from the Google Play app store last week, apparently in response to complaints about privacy abuses and its potential to be used for extortion or even stalking.

"Brazilians are a jealous people, what can I say? Of course it's going to be popular," said Marcia Almeida, a 47-year-old woman in Rio whose marriage ended seven years ago in large part because of what she said was her husband's infidelity.

"It's a different type of spying," she said of comparisons to the NSA surveillance program. "You're checking up on somebody you know intimately, not some stranger."

The app, called "Rastreador de Namorados" (Portuguese for Boyfriend Tracker), promises to act like a "private detective in your partner's pocket."

Functions include sending the person doing the tracking updates on their partner's location and forwarding duplicates of text message traffic from the targeted phone. There is even a command that allows a user to force the target phone to silently call their own, like a pocket dial, so they can listen in on what the person is saying.

Similar apps are marketed for smartphone users in other countries, including Europe and the U.S., but Boyfriend Tracker is the first that has made any impact in Brazil, a country still irate as it learns more about Washington's snooping. Brazil has sent a government delegation to meet with U.S. leaders about the spy program that was revealed by Edward Snowden, the former NSA contractor who has been on the run since May and was recently granted asylum in Russia.

Story continues

Google spokeswoman Gina Johnson said by email that as a policy the company doesn't comment on why apps are removed.

Critics say even as advertised, apps like Boyfriend Tracker can violate privacy rights, and they warn that in the wrong hands they could be used for more sinister purposes, like stalking. Some in Brazil argue it breaks an anti-online harassment and hacking law in place since April. The law is named after Brazilian actress Carolina Dieckmann, who had nude photos of herself leaked by hackers in 2012 after she refused to pay about $5,000.

However, similar apps popular on Google Play market themselves to parents as a means of monitoring how teenage children use the phone and where they are at any given moment.

Matheus Grijo, a 24-year-old Sao Paulo-based developer behind Boyfriend Tracker, says it has attracted around 50,000 users since its launch about two months ago, most since the site began attracting media attention two weeks ago.

Grijo insists his lawyer vetted the app and determined it does not violate any Brazilian laws. Despite being removed by Google, it is still available via direct download from his company's website.

A disclaimer on that website stipulates the app is for "social and recreational use" and absolves the developer of responsibility for any misuse. The first line of the download instructions says a woman installing the tracker on her boyfriend's phone should do so "with his consent."

"We are waiting for Google's position on the removal of 'Boyfriend Tracker' from Google Play, which we consider an error," read a posting on a Facebook page Grijo set up for the app.

To install Boyfriend Tracker, suspicious partners have to get their hands on their loved one's smartphones and upload the app. A free version leaves the app's icon visible on the target's phone, while a version that costs $2 a month masks the icon.

Grijo said the app began as a joke between him and his girlfriend but the idea quickly caught on among their friends.

"In Brazil, we have this culture of switching partners really quickly, so this is a way of dealing with that," said Grijo. "People really appreciate having a tool to help them find out whether they're being cheated on."

He acknowledged that "of course some people are against it, but on balance the response from users has been positive." He said he's received messages of gratitude from around 50 people who used the app to ferret out their partners' infidelity.

While cheating in Brazil cuts both ways, the app is clearly marketed to women suspicious of their male partners, right down to the name. Postings on the app's Facebook page exhort: "Girls, share this."

Still, Grijo insisted he personally has never given his girlfriends any reason to worry.

"I've had three steady girlfriends until now but I've never had these kinds of issues," he said.

___

Associated Press writer Bradley Brooks contributed to this report.