Turkish President Recep Tayyip Erdogan has rejected the European Union's criticism of police raids on media organizations in Turkey, telling the bloc to "keep your opinions to yourselves."

The EU has criticized Sunday's police raids, which targeted a newspaper and a television station affiliated with the U.S.-based Muslim cleric Fethullah Gulen. Police officers, journalists, television producers and scriptwriters were among 27 people detained on charges of "using intimidation and threats" to try to wrest control of state power.

The EU said the raids were incompatible with media freedoms and suggested they could affect Turkey's longstanding bid to join the bloc.

In a speech in northwest Turkey on Monday, Erdogan called the arrests a domestic security issue and said he doesn't care if the raids affect Turkey's EU membership bid.