Both Democrats and Republicans in Congress slammed Apple on Thursday for the company's decision to pull a Hong Kong protest app from the App Store.

The app, HKmap.live, allowed protesters to share the location of police activity.

Apple pulled the app, saying the app was "used in ways that endanger law enforcement and residents in Hong Kong."

"An authoritarian regime is violently suppressing its own citizens who are fighting for democracy," one senator tweeted. "Apple just sided with them."

Visit Business Insider's homepage for more stories.

Apple drew harsh criticism from both Republicans and Democrats in Congress on Thursday after the tech giant decided to pull an app from the App Store that was being used by protesters in Hong Kong.

The app, HKmap.live, allowed protesters in Hong Kong to share the location of police and plan their movements accordingly, similar to apps like Waze.

Apple has repeatedly flip-flopped on whether to allow the app — it initially rejected the app earlier this month, then made it available for download a few days later, before ultimately removing it from the app store on Thursday.

"Apple assured me last week that their initial decision to ban this app was a mistake. Looks like the Chinese censors have had a word with them since," Republican Senator Josh Hawley of Missouri tweeted. "Who is really running Apple? Tim Cook or Beijing?"

An Apple spokesperson was not immediately available to comment. In a previous statement explaining the rationale for removing the app, Apple said HKmap.live was "used in ways that endanger law enforcement and residents in Hong Kong," the New York Times first reported.

In response, developers of HKmap.live told The Verge that "HKmap App never solicits, promotes, or encourages criminal activity. HKmap App consolidates information from user and public sources, e.g. live news stream, Facebook and Telegram."

Democratic Senator Ron Wyden of Oregon, who has a record of being tough on China, also criticized Apple's decision.

"An authoritarian regime is violently suppressing its own citizens who are fighting for democracy," Wyden tweeted. "Apple just sided with them."

Other lawmakers to blast Apple's decision included Republican senator Rick Scott of Florida and Tom Cotton of Arkansas.

Tim Cook, in a leaked memo to employees obtained by Bloomberg's Mark Gurman, talked more about Apple's decision to remove the app. Cook wrote that the app was being used to "maliciously target individual officers for violence," and that he received "credible information" from the Hong Kong Cybersecurity and Technology Crime Bureau as well as the app's users which indicated it was being used for those purposes.

Google on Thursday was accused of removing a game about the Hong Kong protests at the request of Hong Kong police, which the company has denied, saying instead it was because the app violated its policies.

The video game distributor Blizzard has also drawn backlash this week for banning a Hearthstone player for supporting the Hong Kong protests. Before that, a Houston Rockets manager walked back his statement in support of Hong Kong protesters after China's state broadcaster said it wouldn't show future Rockets games.