Turkey’s parliament speaker on Saturday slammed the U.S. for working with the terrorist PKK/PYD/YPG to eliminate another terrorist organization, Daesh.

"Unfortunately a country that we see as our ally took steps to eliminate Daesh by collaborating with the PKK's Syrian branch, the PYD/YPG. This is a very wrong method," Binali Yildirim told a gathering of parliament speakers in Iran’s capital Tehran.

"Let's say you eliminated Daesh [through the PYD/YPG]. Then what terror group would you work with to eliminate the PYD/YPG? It's a dead end," he argued.

Yildirim said trying to use one terror group to eliminate another one is a mistake.

Turkey has repeatedly objected to U.S. support for the terrorist PKK/PYD/YPG as a "reliable ally" in Syria, which has included supplying arms and equipment.

In its more than 30-year terror campaign against Turkey, the PKK -- listed as a terrorist organization by Turkey, the U.S. and the EU -- has been responsible for the death of some 40,000 people, including women and children. The PYD/YPG is its Syrian branch.

Common threat

He said that in addition to Turkey, Iran, Iraq, and Syria are facing the same terrorist threats.

Yildirim said similar problems occur in Afghanistan and Pakistan and so these countries should cooperate closely and talk to each other to eliminate terror.

He stated terror is one of the greatest problems that humanity faces and that this threat is global.

"With measures and multilateral cooperation, we can eliminate terror's ruinous effects," Yildirim said, adding that whoever favors terror will eventually face the consequences.

"Only arms dealers and warlords win from terror," he said.

Yildirim added that for years Turkey has been paying a major price in the fight against terror.

"Turkey has fought the PKK and other terrorist organization for 40 years, and Turkey has spent roughly $300 billion in this fight," in addition to having thousands of innocents and Turkish security forces martyred, he said.

Yildirim said Turkey also faced another terrorist group, the Fetullah Terrorist Organization (FETO), the group behind the 2016 defeated coup, which also abused many innocents in their own private schools.

"They tried to mount a coup using the Turkish state's weapons, tanks, and fighter jets, and martyred our people," he said.

"When the conditions are ripe, this group will also harm you," Yildirim warned, saying that Turkey continues to tell other countries about this threat.

FETO and its U.S.-based leader Fetullah Gulen orchestrated the defeated coup of July 15, 2016 which left 251 people martyred and nearly 2,200 injured.

Ankara also accuses FETO of being behind a long-running campaign to overthrow the state through the infiltration of Turkish institutions, particularly the military, police, and judiciary.

During his visit to Iran, Yildirim also separately met his Russian counterpart Vyacheslav Volodin and Iranian President Hasan Rouhani.

Yildirim said that Turkey is determined to continue cooperation with Iran and Russia to solve problems in the region and end suffering.