1 of 9
Cagdas Erdogan, Associated Press
Mourners gather around the body of Gulay Ozarlan, a DHKP-C militant, that was killed in a gunfight with police during a major police sweep that was launched against the outlawed group as well as suspected members of the outlawed Kurdish rebel group, the PKK and also Islamic State group militants, during her funeral In Istanbul, Saturday, July 25, 2015.

ANKARA, Turkey — Turkey's sudden willingness to join the fight against the Islamic State group is a sign that it's afraid of losing clout with the U.S., but its second front against Kurdish rebels in Iraq on Saturday could complicate Washington's war.

For months, Ankara had been reluctant to join the U.S.-led coalition against IS despite gains made by the extremist group on Turkey's doorstep.

Now, Turkish warplanes are directly targeting IS locations — the latest bombing run coming early Saturday for a second straight day. Turkey then opened a second front on Kurdish rebel sites.

The strikes against the Kurdistan Workers' Party, or PKK, muddle the U.S.-led fight against IS. The United States has relied on Syrian Kurdish fighters affiliated with the PKK while making gains against IS.

U.S. officials declined to comment publicly on the Turkish strikes in northern Iraq.

The Turkish jets hit shelters and storage facilities belonging to the PKK in seven areas in northern Iraq, including Mount Quandil where the group's headquarters are located, authorities said. It was Turkey's first aerial raid in northern Iraq against the PKK since Turkey embarked on peace talks with the Kurds in 2012. The PKK declared a cease-fire in 2013.

Turkey's shift in policy toward the fight against IS also comes amid closer cooperation between Iran and the U.S. following a recent nuclear agreement. An analyst said the agreement threatened to lessen Turkey's strategic importance, prompting it to cooperate with the U.S.-led coalition against the extremists.

Turkey launched the raids on the IS following a suicide bombing by the extremist group, which killed 32 people, and an IS attack on Turkish forces, which killed a soldier. It also declared that it had reached an agreement with Washington to open up its southern air bases to coalition aircraft, giving itself a front-line role in the fight against IS.

Fadi Hakura, a Turkey analyst at Chatham House in London, said Turkish leaders feared that the increased cooperation between Iran and Washington in the battle against IS would sideline Turkey from U.S. calculations, providing one impetus to allow U.S. fighter jets to use Turkish air bases near the Syrian border.

In addition, Islamic State has grown substantially more powerful in the last year, and controls a wider swath of the Turkey-Syria border, leading Turkish intelligence to change its assessment so that it now views the militant group as an imminent threat to Turkish security, said Hakura.

"The use of the Turkish air base is extremely important," he said. "Before, the U.S. had to traverse 1,000 miles to target IS in Syria. Now it will be much less, so naturally the air campaign will be far more intense and far more effective."

The attacks against PKK positions in Iraq comes amid signs of trouble in the peace process, with Turkey accusing the Kurdish rebels of not keeping a pledge to withdraw armed fighters from Turkey's territory and to disarm. Turkey is also concerned that gains made by Kurds in Iraq and in Syria could encourage its own minority to seek independence.

Tensions have been flaring with the Kurds in recent days following the IS suicide bombing in the southeastern city of Suruc on Monday. Kurdish groups have blamed the government for not doing enough to prevent IS operations. On Wednesday, the PKK claimed responsibility for the killing of two policemen in the Kurdish majority city of Sanliurfa.

The PKK said the strikes spelled the end of the peace process aimed to end three decades of conflict in Turkey's mainly-Kurdish southeast that has killed tens of thousands of people.

"Turkey has basically ended the cease-fire," Zagros Hiwa, a PKK spokesman, told The Associated Press.

Turkey's pro-Kurdish party, the People's Democratic Party, also said the strikes amounted to an end of the two-year-old truce. It called on the government to end the bombing campaign and resume a dialogue with the Kurds.

While conducting raids, Turkey has simultaneously been clamping down on suspected IS and PKK militants and other groups inside the country. Prime Minister Ahmet Davutoglu said Saturday nearly 600 suspects were detained in two days of raids in 22 provinces.

"Turkey's operations will, if needed, continue until the terror organizations' command centers, all locations where they plan (attacks) against Turkey and all depots used to store arms to be used against Turkey are destroyed," Davutoglu said.

In other attacks, seven police officers were wounded after suspected PKK militants hurled a small bomb at a police station in Bismil, near the mainly Kurdish city of Diyarbakir, the Dogan news agency reported Friday.

On Friday, three F-16 jets struck Islamic State targets that included two command centers and a gathering point near the Turkish border in Syria. The Syrian Observatory for Human Rights said nine Islamic State militants were killed in the raids. The extremists have yet to comment on the strikes.

The Syrian government has so far refrained from commenting on Turkish strikes inside Syrian territory, but Syria's main political opposition group, which is backed by Ankara, welcomed Turkey's move.

Associated Press writers Gregory Katz in London, Bram Janssen in Irbil, Iraq, Vivian Salama in Baghdad and Zeina Karam in Beirut contributed to this report.

(An earlier version said the Turkish strikes targeted five areas in northern Iraq. Seven areas were targeted.)