President Trump has offered Turkish President Recep Tayyip Erdogan, due to visit the White House on Wednesday, a package of inducements for better U.S.-Turkey relations that is virtually identical to those the administration proposed last month in a failed effort to stop Turkey’s invasion of Syria.

In a new letter to Erdogan last week, Trump told the Turkish president that a $100 billion trade deal, and a workaround to avoid U.S. sanctions over Turkey’s purchase of Russia’s S-400 missile defense system, are still possible, senior administration officials said.

The offer is likely to infuriate at least some of the overwhelming House majority that voted last month to impose sanctions on Turkey over its assault into Syria, and a bipartisan group of senators who introduced a similar bill.

“It’s absolutely shameful that President Trump has invited President Erdogan to the White House after Erdogan attacked our Syrian Kurdish allies,” and forces under Turkish command “have committed what this administration itself describes as war crimes,” said Sen. Chris Van Hollen (D-Md.), who sponsored the Senate bill along with seven other Democrats and eight Republicans.

Trump has long shown affinity for the Turkish leader, calling him “a friend,” and “a tough guy who deserves respect.” Erdogan’s White House visit was also part of the package Trump offered in an Oct. 6 phone call with the Turkish leader.

“We took [the offer] off the table, obviously, when the Turks went in” to Syria, one senior official said. “Once we got the cease-fire, of sorts, we decided to put the package, including the visit, back on the table.”

In exchange for Trump’s revived offer, Erdogan would continue what the administration has said is its adherence to an Oct. 17 cease-fire agreement, negotiated with Vice President Pence a week after the invasion began, that limited the Turkish incursion. Turkey, a NATO ally, would also continue to actively support U.S. goals of preventing a resurgence of the Islamic State in Syria and establishing a stable and representative Syrian government.

“The second thing is they resolve the S-400 thing to our satisfaction,” said the senior official, one of several who spoke on the condition of anonymity about internal policy deliberations. Delivery of the Russian system earlier this year triggered a U.S. decision to cut Turkey from the manufacture and purchase of F-35 aircraft, and mandated sanctions under the 2017 Countering America’s Adversaries Through Sanctions Act (CAATSA), aimed at those who purchase Russian defense equipment.

Trump has delayed imposing those sanctions, despite the insistence by senior administration officials earlier this year that mere delivery of the equipment — which the United States and NATO have said would compromise the stealth capabilities of the new generation F-35 combat jet — would be unacceptable. Delivery began in July.

Now, the administration’s red line is that the S-400s “do not become operational” in a way that would allow them “access to our F-35 communications and defenses,” said the senior official.

One solution under discussion is that Turkey submit to monitoring to ensure it did not unpack and deploy the delivered system. It could then be readmitted to the F-35 program.

Another senior administration official declined to address specifics of the U.S. package but said that “this visit is an opportunity for full and frank engagement with President Erdogan to address the challenges facing the United States-Turkey relationship. The achievement of any bilateral trade goal first requires concrete progress toward resolving major issues, such as Turkey’s purchase of Russia’s S-400.”

The London-based Middle East Eye, which first reported Trump’s new letter to Erdogan, said he also warned that failure to reach agreement on the Russian system could make CAATSA sanctions inevitable. A deal, however, could also assuage the zeal of some senators to punish Turkey for the invasion itself. Van Hollen said his main co-sponsor on the Senate bill, Sen. Lindsey O. Graham (R-S.C.), was still committed to pushing it forward. Graham, whose office did not respond to a request for comment, has said he would consider dropping the invasion-related sanctions legislation if Turkish forces withdrew from northern Syria.

Turkey’s offensive, launched Oct. 9 after Trump ordered U.S. forces in Syria to pull back from the border and suggested that the Syrian Kurds do the same, did not result in the bloodbath that many had feared. But it has not provided the kind of stability Erdogan’s government had promised, amid ongoing clashes and persistent reports of civilian suffering.

More than a month into the operation, more than 100,000 people in northern Syria remain displaced from their homes, according to the United Nations.

“There are fears that the displaced are not getting access to food, to clean water or to medical supplies,” Margaret Huang, the executive director of Amnesty International, said in a conference call with journalists Tuesday.

A Turkish proxy force, the rebel Syrian National Army, has become a lightning rod for criticism, with its fighters accused of widespread abuses, including summary executions, beatings, kidnappings and looting in areas under Turkey’s control.

Footage captured by U.S. surveillance aircraft over northern Syria has documented several incidents that military officials say may constitute war crimes on the part of Turkish-backed forces there, a U.S. official said.

The U.S. military also is tracking other possible abuses that have been reported by activists or leaders from the Syrian Democratic Forces (SDF), the Kurdish-led group that U.S. Special Operations troops have worked closely with in Syria for four years in the fight against the Islamic State.

Existence of the videos was first reported by the Wall Street Journal.

The American repositioning has allowed Russian and Syrian government forces to enter areas that they had been shut out of for years, strengthening the position of Syrian President Bashar al-Assad in his quest to reclaim all Syrian territory.

But Turkey’s proxy force has also fought with Syria’s national army, in occasionally deadly skirmishes that have threatened a Russian-Turkish agreement intended to calm northern Syria while at the same time dividing the territory into spheres of influence.

Weeks of turbulence have put Ankara on the defensive. Erdogan, who said last month that any abuses by Turkish-allied Syrian rebels would be investigated, has taken to defending them of late, saying this month that the rebels are “defending their land there, hand in hand, arm in arm, shoulder to shoulder with my soldiers.”

His government has also bristled at criticism, including from European states, that Turkey’s offensive was likely to strengthen the Islamic State because it weakened the U.S.-Kurdish alliance and distracted Kurdish fighters who were guarding prisons holding Islamic State militants. To prove Turkey’s credentials as a determined partner in the anti-Islamic State coalition, the authorities have conducted sweeps against the group across Turkey in recent weeks and announced the capture of hundreds of members in Syrian territory under its control.

Ankara has also sought to force Western states to take back captured militants, despite strong resistance, especially in Europe. On Monday, Turkey began deporting suspected Islamic State members who are detained in Turkey, including nationals of the United States, Denmark and Germany. More Europeans, including French and Irish citizens, would be sent home in the coming days, Turkey’s Interior Ministry said.

On Tuesday, Erdogan threatened to open the floodgates.

“You should review the attitude you are exhibiting against Turkey, the country that has this many [Islamic State] members found in its prisons, and at the same time that has taken control of the areas where they are found on the Syrian side,” he said, addressing the European Union shortly before departing to the United States.

Fahim reported from Istanbul.