Live updates: follow the latest news on Russia-Ukraine
A late-night compromise saw the European Union's 27 members agree to stop crude oil shipments but leave pipelines open, in a concession to Hungary and its outspoken Prime Minister Viktor Orban.
EU officials say about 90 per cent of imports will effectively be cut after Poland and Germany offered assurances that they would press ahead with ditching Russian oil, despite in theory being eligible for the pipeline exemption.
Leaders who had lobbied for the oil embargo said they welcomed the agreement on a sixth sanctions package, but the fraught negotiations that tore at the edges of western unity over Ukraine are likely to pose an obstacle to their hopes of pushing Russia harder.
Ukraine and some EU member states have urged the bloc's leaders to tackle the subject of natural gas imports, but the union is particularly reliant on Russia in that field. Belgian Prime Minister Alexander De Croo said it was time for Europe to pause and watch the effect of the oil ban before venturing into gas.
"As you go from round to round it becomes more challenging, and oil and gas are particularly challenging," Irish leader Micheal Martin said as leaders reconvened for the second day of the summit in Brussels.
Estonian Prime Minister Kaja Kallas, who favours a hard line on Russia, said she was pleasantly surprised that an oil agreement was reached at all and said the compromise was better than nothing.
But "gas is of course much more difficult than oil already was," she said. "I think that gas has to be in the seventh package but I’m realistic as well. I don’t think it will be there."
Supporters of energy sanctions say they are necessary to deprive Russia of money for its invasion of Ukraine and loosen the Kremlin's hold over Europe's power grids. Sceptics say the cost to European consumers is too high at a time of runaway fuel prices.
Austrian Chancellor Karl Nehammer, whose government eventually came round to an oil embargo after initial scepticism, said there was no prospect of a gas ban in a potential seventh package.
On oil, "there are technical problems that were solved with Viktor Orban," he said, after concessions to the Hungarian leader ended a month-long stand-off over the package. "With gas it’s very different."
Latvian Prime Minister Arturs Krisjanis Karins, who on Monday had made clear his frustration at the prolonged negotiations, said the deal was a "fantastic step in the right direction".
"We move as quickly as we can all move together," said Mr Karins, who supports a ban on all Russian fossil fuels.
Mr Orban meanwhile claimed victory after he secured an exemption for pipeline oil and assurances that Hungary's neighbours would step in if there are interruptions in supply.
European Commission chief Ursula von der Leyen, who initially proposed a ban on all Russian oil, said investment would be needed in Hungarian refineries and an alternative pipeline route from Croatia, but did not say who would pay for this.
"Brussels' proposal would have been similar to an atomic bomb, but we managed to avoid it," Mr Orban said after the late-night agreement in Brussels.
The oil ban was agreed in principle at a two-day summit in Brussels devoted to the fallout from the war in Ukraine. A more detailed legal text was expected to be considered by diplomats on Wednesday.
The sixth sanctions package will also see European insurers banned from covering Russian shipping, more individuals added to the EU's sanctions list and Russia's Sberbank cut off from international payments system Swift.