To the irritation of the US, Turkey carried out airstrikes Tuesday against US allies in Syria and Iraq. A day later, it was revealed that Erdogan's government had detained another 1,000 "opposition" figures, in an ongoing purge that has outraged Europe.

Basking in his referendum win this month , which altered the constitution to give him sweeping new powers, the Turkish leader appears intent on testing his opponents, and some of his allies, too.

He has taken his referendum victory as a sign that Turks are happy with his government's crackdown following last July's failed military coup, which has gutted the opposition, civil society and free press.

And the emboldened President appears to be taking this new confidence abroad. The airstrikes in Syria and Iraq mark an escalation by Turkey and put it in conflict with the US-led coalition's mission against ISIS in those countries.

Erdogan vows more airstrikes

Kurdish elements of the Syrian Democratic Forces -- the main US ally in the fight against ISIS in Syria -- and the Iraq-based Kurdish Peshmerga said at least 25 of their fighters were killed Tuesday in the airstrikes. The People's Protection Units (YPG), the Kurdish faction of the Syrian Democratic Forces, is considered a terrorist group by Turkey's government; it is armed and supported by the United States.

Turkey's air force claimed it was actually targeting members of the Kurdistan Workers Party (PKK), considered a terrorist organization by both Turkey and the United States. But Turkey often bands the PKK and YPG together. Seventy people were killed in the raids, the air force said.

Turkey's military described the strikes as a "counterterrorism" operation "within the scope of the international law" to prevent the PKK from sending "terrorists, arms, ammunition and explosives" to Turkey, according to state media.

Erdogan was unapologetic about the strikes, telling the Reuters news agency that he would not let northern Iraq's Sinjar region become a base for PKK militants and that Turkey would will continue military operations there and in northern Syria "until the last terrorist is eliminated."

On Wednesday, the Turkish military carried out another air raid on the PKK, killing six fighters in the Zap region of northern Iraq, the country's armed forces said. It was the latest in the Turkish government's decades-long fight against the PKK, a Kurdish separatist group that has carried out attacks in Turkey.

The Tuesday airstrikes caused a rift with the US, which sent forces to the strike site Wednesday, a US official said.

"We are very concerned, deeply concerned, that Turkey conducted airstrikes earlier today in northern Syria as well as northern Iraq without proper coordination either with the United States or the broader global coalition to defeat ISIS," US State Department spokesman Mark Toner said.

"We have expressed those concerns to the government of Turkey directly," he said.

Turkish Foreign Minister Mevlut Cavusoglu said that the US and Russia were informed two hours before the raid. "We informed the US, one of our allies, that we would carry out an air operation in this region soon and requested that they withdraw their armies to 20-30 kilometers south out of our border," he said through state media Anadolu.

The information was also shared with Russia and the coalition's air coordination center in Qatar, Cavusoglu said.

But a spokesman for Operation Inherent Resolve said Turkish airstrikes were conducted without proper coordination with coalition forces. There was less than an hour's notice before the strikes and coalition forces were within six miles of the strike, Colonel John Dorrian said in Baghdad, Iraq.

"We believe that's inadequate," he said. "That's not enough time."

Russia's Ministry of Foreign Affairs also criticized Turkey, issuing a statement that said, "We consider such actions unacceptable and contradictory to the basic principles" of intergovernmental relations. The statement added Moscow "is very concerned about these actions. The Kurdish forces are fighting 'terrorist' organizations, namely ISIS."

Erdogan locks horns with Europe over detentions

Turkey detained 1,009 people in raids in 72 cities across the country, Interior Minister Suleyman Soylu said in a televised statement Wednesday, adding that some of them were from the country's police force.

The detainees were connected to Fethullah Gulen, the reclusive cleric accused by Turkey of being behind the coup attempt, he said.

Turkey also suspended 9,103 members of its security forces for suspected links to Gulen, according to Turkish state media.

The suspensions mean their active duty is put on hold. The suspended personnel will await their fate while under suspension. They will either be fired or allowed to return to work.

"It is an important step for Turkish republic," Soylu said, describing those detained as "secret imams."

Turkey accuses Gulen of orchestrating the failed coup attempt.

Authorities have detained more than 47,000 people in the country since then in what Europe has slammed as an autocratic clampdown on civil freedoms.

The new round of detentions come as European leaders on Wednesday discuss relations with Turkey.

The Parliamentary Assembly of the Council of Europe on Tuesday placed Turkey back on a human rights watch list, claiming the referendum was conducted on an "uneven playing field" and that Erdogan had ruled undemocratically through decrees following the attempted coup.

Erdogan dismissed the decision as "entirely political," and in an earlier interview with CNN, he denied accusations that he had become a dictator.

He also responded with a threat to drop his country's bid to join the European Union.

Talks over Turkey's application to join the union have continued for more than five decades and have gone nowhere. "Why should we wait any longer? We are talking about 54 years," Erdogan said in an interview with the Reuters news agency.

"In Europe, things have become very serious in terms of the extent of Islamophobia. The EU is closing its doors on Turkey, and Turkey is not closing its doors on anybody."

Turkey has welcomed more Syrian refugees than any other country in the world, with around 3 million now living there. It also has agreed to a people-swap deal to keep a large number of refugees from leaving its shores for EU countries, which it has used as a bargaining chip to try and win visa-free travel to the EU for its citizens.

The Turkish President said he wasn't against a referendum on dropping the EU bid, pointing to the British vote last year to leave the union as a positive decision for the country's future.

"They have peace of mind, they are walking towards a new future," Erdogan said.

The President has already shown he has lost interest in the EU, suggesting his country may reintroduce the death penalty, which would automatically disqualify the country from membership.

But Erdogan does not appear to want Turkey to be solely inward-looking. As he shuns the West, he is finding new allies north and east.

Turkey is a co-broker with Russia and Iran in ceasefire talks in the Syrian conflict.