Turkish President Tayyip Erdogan speaks June 20, 2019, with international media in Istanbul. It was his first appearance before the foreign news media in years. (Kayhan Ozer/Turkish Presidential Press Office/Reuters)

President Recep Tayyip Erdogan said Thursday that he did not expect the United States to impose sanctions on his government over its purchase of a sophisticated Russian air defense system, citing long-standing U.S.-Turkish ties but also his warm personal relationship with President Trump.   

 The United States and NATO have strenuously objected to Turkey’s procurement of the Russian S-400 missile defense system, but Erdogan called it a done deal Thursday and said Turkey would take delivery of the system in the first half of July.

In Washington, Congress has threatened to impose sanctions in response, and the Pentagon said this month that it would stop training Turkish pilots to fly the U.S.-made F-35 warplane because of Turkey’s purchase of the Russian system.  

But Erdogan, speaking Thursday in a rare meeting with foreign journalists, seemed confident in his ability to manage the fallout from the purchase and said he intended to speak with Trump about the matter at the Group of 20 meeting in Japan this month.

“I will say, ‘Do you find such sanctions against Turkey suitable?’ ” Erdogan said. “I do believe Mr. Trump will say he doesn’t.”

 “We’re friends,” Erdogan added. “We’re strategic partners.”

 During the lengthy news conference — his first appearance before the foreign news media in years — Erdogan, appearing relaxed, discussed his relationship with the United States as well as Russia, and regional issues, including the escalating confrontation between the United States and Iran. He criticized the U.S. approach to Iran, saying it was “causing great unrest.”

His comments came just days before a mayoral election in Istanbul that has focused attention on what critics say is Erdogan’s increasingly authoritarian style of leadership. Erdogan and his ruling Justice and Development Party were criticized in recent months after they asked for the cancellation of the previous round of voting, which showed that an opposition candidate had won.

 Erdogan said Thursday that his party would “accept the outcome” of the revote, which will be held Sunday. He harshly criticized the opposition candidate, Ekrem Imamoglu, while declining to refer to him by name.  

 The Turkish leader also spoke at length about a report released Wednesday on the death of the journalist Jamal Khashoggi, who was killed in the Saudi Consulate in Istanbul in October. The report by Agnes Callamard, a United Nations human rights expert, relied heavily on audio recordings said to be of Khashoggi’s death and dismemberment that were provided to her by Turkish intelligence.

Erdogan, who said he had twice met Khashoggi, highlighted the report’s finding that the slaying of The Washington Post contributing columnist was an “extrajudicial killing” carried out by Saudi Arabia. The kingdom’s leaders, he added, were working to sweep the episode under the rug — “trying to lull us to sleep,” he said. 

Erdogan’s repeated criticisms of Saudi Arabia have put him at odds with the Trump administration, which has condemned Khashoggi’s death but said that the killing should not interfere with the more important alliance between the United States and Saudi Arabia.  

 The Khashoggi matter is among a litany of issues dividing Ankara and Washington. The governments have sparred over U.S. support for a Kurdish-led force in Syria, Turkey’s prosecutions of U.S. consular employees and the S-400 purchase, which has sparked one of the most serious and consequential disputes to date. 

 Throughout those arguments, though, Erdogan has largely refrained from criticizing Trump directly, portraying decisions that have angered Turkey as the work of headstrong underlings in the U.S. bureaucracy. “We agree with him on many matters,” Erdogan said Thursday. 

 “When we have contacts with his subordinates,” he added, “our people on many occasions cannot see eye to eye.”