Turkey on Friday cautioned its citizens about traveling to the United States, in retaliation for a new U.S. travel advisory that warned Americans about terror threats and arbitrary detentions in Turkey.

Prime Minister Binali Yildirim said the U.S. travel warning "unfairly" portrayed Turkey as an unsafe country and did nothing to improve frayed ties between the NATO allies.

"Ankara is as safe as Washington, Istanbul is as safe as New York," Yildirim said.

The Turkish travel advisory urged citizens to reconsider travel plans to the United States, citing a series of terror attacks and violent incidents, including in Charlottesville, Ohio University and a mosque in Minnesota.

It also warned about "arbitrary arrests" in the U.S. — an apparent reference to a Turkish banker who was arrested in the U.S. and convicted of helping Iran avoid U.S. sanctions.

The travel warning came a day after the United States urged its citizens to reconsider travel to Turkey, saying "terror groups continue plotting possible attacks in Turkey." It also cited the risk of arbitrary detentions under an ongoing state of emergency "based on scant or secret evidence and grounds that appear to be politically motivated."

Ties between the allies have deteriorated over what many in Turkey perceive as a U.S. reluctance to extradite U.S.-based Muslim cleric Fethullah Gulen, whom Turkey blames for a 2016 failed coup attempt. Gulen denies any involvement, and U.S. officials say the legal process is still ongoing.

Turkey is also angered at U.S. support for Syrian Kurdish militia that it considers to be "terrorists." The trial of the Turkish banker has also heightened tensions.

The U.S. last year temporarily suspended visa services to Turkish citizens following the arrest of a local Turkish employee of the U.S. Consulate in Istanbul.