Live updates: follow the latest news on Russia-Ukraine
Ukrainian President Volodymyr Zelenskyy met UN Secretary General Antonio Guterres in Kyiv for talks on Thursday amid the continuing Russian invasion.
The meeting came after Mr Guterres surveyed the destruction in small towns surrounding the capital and saw some of the horrors from the first onslaught of the war.
He condemned the atrocities committed in places such as Bucha, where evidence of mass killings of civilians was found after Russia retreated in the face of unexpectedly stiff resistance.
Mr Guterres also mentioned his meeting in Moscow with Russian Foreign Minister Sergey Lavrov, in which he called the Russian invasion “war”.
He said the Security Council failed to go far enough in its efforts to “prevent and end” Russia’s war in Ukraine.
“Let me be very clear: the Security Council failed to do everything in its power to prevent and end this war. And this is the source of great disappointment, frustration and anger,” he said alongside Mr Zelenskyy.
The UN is doing everything possible to ensure the evacuation of civilians from the "apocalypse", Mr Guterres said.
"Today, the people of Mariupol are in desperate need … they need an escape route out of the apocalypse," he said.
"We are doing everything we can to make it happen."
Earlier, Mr Guterres declared Russia's invasion of Ukraine “an absurdity” as he visited the towns on Thursday.
Mr Guterres was accompanied by local military and civilian leaders who showed him residential buildings that were destroyed when Russia attacked and temporarily occupied the towns.
He was told by a Ukrainian military official that 112 civilians had been found dead in Borodyanka and that half of its buildings had been hit by Russian fire.
Speaking about what he called the “horrendous sight” left behind by Russian troops, Mr Guterres said “civilians always pay the highest price” in a war they did not initiate.
“I imagine my family in one of those houses that is now destroyed and black. I see my granddaughters running away in panic," he said. “So the war is an absurdity in the 21st century."
On possible prosecutions of Russian officials after visiting Bucha, Mr Guterres said: "When we talk about war crimes, we cannot forget that the worst of crimes is war itself."
Bucha has become synonymous with the alleged atrocities committed by Russian troops in Ukraine, after bodies of hundreds of civilians were discovered following the withdrawal of Moscow's troops last month.
Ukrainian prosecutors said on Thursday that they were investigating 10 Russian soldiers for alleged war crimes in Bucha.
The chief prosecutor of the International Criminal Court is also working with Ukraine and its allies to investigate the claims. Moscow pulled out of the ICC treaty in 2016.
Since pulling out of Kyiv, Russia has refocused its offensive on the south and east of Ukraine.
Ukraine said it had repelled six attacks by Moscow's forces in the breakaway Donetsk and Luhansk regions in the past day.
The Ukrainian military said the Kremlin was looking to establish full control over those regions but claimed Russia had lost another 400 troops in 24 hours, taking the purported total to 22,800.
Mr Guterres told CNN that despite his diplomatic efforts, "the war will not end with meetings" but when Russia agrees to a ceasefire and paves the way for a political solution.
As Mr Zelenskyy continues his appeals for military support from the West, MPs in Germany voted to approve the export of heavy weapons such as anti-aircraft tanks, a move welcomed by Ukraine after weeks of complaints over the pace of military support from Berlin.
Nato Secretary General Jens Stoltenberg, meanwhile, said the alliance was ready to maintain support for Ukraine for years if the conflict dragged on for that long.
He said longer-term support for Ukraine would include training its troops on advanced western equipment instead of relying on Soviet-era gear forwarded by countries in the former Warsaw Pact.
"There is absolutely the possibility that this war will drag on and last for months and years," Mr Stoltenberg said.
The trip by the UN chief is his first to Ukraine since the invasion in February, making him the latest senior figure to go to Kyiv after the leaders of Britain, the EU and other powers.
It comes two days after Mr Guterres held talks in the Kremlin with Russian President Vladimir Putin.
Although Mr Guterres was criticised by some for offering Moscow a propaganda opportunity, the UN said the meeting had produced an agreement in principle to get civilians out of a surrounded steel plant in Mariupol.
Ukraine says civilians are sheltering in the Azovstal steelworks alongside soldiers defending the southern port, which both sides say is mostly in Russian hands.
Humanitarian workers from the UN and the Red Cross are trying to arrange an evacuation but say a ceasefire is needed to enable this.
Ukraine and Russia blamed each other for earlier failed attempts at opening humanitarian corridors.
Farhan Haq, a spokesman for Mr Guterres, said some military activity was still going on at Azovstal, despite Mr Putin's statement last week that the plant should be sealed off rather than stormed.
“We want to make sure that is halted, and in such a way that we can actually bring people to safety. We don’t have those conditions on the ground as of this moment,” Mr Haq said.