European Union leaders agreed to block more than two-thirds of Russian oil imports after Hungary objected to a total ban.
The deal cut off a huge source of financing for the Russian war machine, according to the European Council chief.
He said that it put a lot of pressure on Russia to end the war.
The ban is part of a sixth package of sanctions that all 27 member states had to agree on.
The EU agreed to tough measures against Russia's largest bank and three state-owned broadcasters.
Hungary is the main opponent of the EU's ban on Russian oil imports.
The European Commission proposed a ban on Russian oil imports a month ago.
The EU's troubled latest round of sanctions was held up by resistance from Hungary.
Slovakia and the Czech Republic are both dependent on Russian oil and asked for more time. Bulgaria was also cut off from Russian gas.
The cost of living crisis in Europe has not helped. Sky-rocketing energy prices have curbed the appetite of some EU countries for sanctions which could hurt their own economies.
European Commission President Ursula von der Leyen had said that her expectations were low and that the EU should stop quarrelling.
Hungarian Prime Minister Viktor Orban blamed the European Commission for failing to negotiate the ban with member countries.
He said that energy was a serious issue and that we need solutions and then the sanctions.
The President of Ukraine, Volodymyr Zelensky, dialled into the summit and urged EU countries to stop their internal quarrels.
Mr Zelensky said that all quarrels in Europe must end because they encourage Russia to put more and more pressure on you.
He said it was time for you to be one whole.
The Prime Minister of Latvia said that member countries should not get bogged down in their own interests.
It will cost us more. It is only money. He said that the Ukrainians are paying with their lives.