The United States has agreed to engage India and explore a mutually agreeable solution on the issue of purchase of Iranian oil despite its deadline for countries to halt imports, an official familiar with discussions at the 2+2 Strategic Dialogue in New Delhi said on Thursday.

India is also hopeful that it will be excluded from US sanctions over the purchase of S-400 anti-aircraft missile defence systems from Russia, though this specific buy was not discussed when external affairs minister Sushma Swaraj and defence minister Nirmala Sitharaman met US Secretary of State Mike Pompeo and Defence Secretary Jim Mattis, another official said on the condition of anonymity.

Pompeo said on Thursday the US would work with India on the two issues. “Our effort here is not to penalise a great strategic partner like India,” Pompeo told reporters at the US embassy in New Delhi to a question on India’s purchase of the Russian defence equipment.

“We have told the Indians consistently... that on November 4th the sanctions with respect to Iranian crude oil will be enforced, and that we will consider waivers where appropriate, but that it is our expectation that the purchases of Iranian crude oil will go to zero from every country, or sanctions will be imposed. So we’ll work with the Indians. We committed that we would do that,” Pompeo said.

He said that with respect to the S-400 deal, no decision had been taken.

The US has said that countries need to reduce the import of oil from Iran to zero, though they “would consider waivers” and from the sanctions that are planned to begin on November 4. The Trump administration had exited a 2015 deal between Iran and six world powers after a pact intended to stall Tehran’s nuclear programme.

Indian officials maintained that “it would not be a viable proposition for India to reduce the oil imports Iran to zero. The US understands our concerns and both sides will continue with the discussions on the issue,” the first official said.

India is the biggest buyer of oil from Iran after China, and it is seeking a waiver from the US. Iran is a key partner for India and the two countries are engaged in the development of the strategically significant Chabahar port, which would give land-locked Afghanistan access to sea, bypassing Pakistan.

For the benefit it would bring to Afghanistan, India has urged US for a carve-out for the Chabahar port. The US sanctions on Iran cover ports, too. The petroleum sector sanctions will kick in on November 4.

“We’re asking all of our partners, not just India, to reduce to zero oil imports from Iran and so I’m confident that will be part of our conversation with India,” Reuters had quoted an official telling reporters accompanying Pompeo ahead of the 2+2 talks.

After the talks on Thursday, the second Indian official said: “We hope the US would understand the significance of our ties with Iran as well as our imperatives as a major oil exporting country. We have been assured that the US would help us meet the challenge. But the ties with Iran are important for us. We are hopeful of a finding a solution through the discussions that doesn’t affect our economic priorities, and ties with Iran and factors in our relationship with the US.”

The US Secretary of State also spoke about the trade issue after the talks. “We want... the trade deficit that the US has in its trade with India to be rectified. They have made some progress on that and we thank them for that. They’re going to buy more energy products from the US. They’re going to purchase more aircraft from the US... But the gap will remain, and so we are urging them to do all that they can to narrow that gap.

Strategic affairs expert Brahma Chellany was not impressed with the developments. “The US side got what it wanted — India’s signature on Comcasa. What did India get? India has become a prime victim of US sanctions on Iran and Russia. The sanctions on Iran increased India’s oil appreciated the rupees,” he said.

On the Russia-related sanction threat to India, he said it goes far beyond the likely purchase of the S-400 systems. “India also intends to buy other major weapons systems from Russia”, Chellany said.