British Foreign Secretary David Cameron has vowed to maintain military support for Ukraine during a surprise visit to Kyiv, with the West's attention focused on the Middle East.

The former British prime minister was in Kyiv and also visited the southern port city of Odesa on his first trip abroad as foreign minister of the UK, which has been a staunch ally of Ukraine since Russia invaded.

"We will continue to give you the moral support, diplomatic support, the economic support, but above all, the military support, that you need not just this year, and next year, but for however long it takes," Mr Cameron said during a meeting with Ukrainian President Volodymyr Zelensky.

President Zelensky thanked David Cameron for making the trip while the world's attention was focused on more than one month of brutal fighting between Israel's army and Hamas

"Russia thinks it can wait this war out, and that the West will eventually turn its attention elsewhere. This could not be further from the truth," he added in a separate statement.

His visit, nearly two years into Russia's invasion of Ukraine, came with global attention shifting to the conflict between Israel and Hamas.

President Zelensky thanked David Cameron for making the trip while the world's attention was focused on more than one month of brutal fighting between Israel's army and Hamas.

"Now you know the world is not focused on the situation on our battlefield in Ukraine and dividing the focus really does not help," he told Mr Cameron in a video distributed by the presidency.

He added that the two men had had a "good meeting" that focused on "weapons for the front line, strengthening air defence, and protecting our people and critical infrastructure".

Mr Cameron's backing for Ukraine came with concern building among Kyiv's allies over minimal military advances in recent months.

Neither Russia nor Ukraine has made any significant territorial gains for a year, and Kyiv's top army commander said that fighting had ground to a stalemate.

But there are growing reports that Ukrainian forces have gained a foothold on the eastern bank of the Dnipro river in the south of the country, which Kyiv hopes could pave the way for substantial Ukrainian advances towards Crimea.

Ukraine's Foreign Ministry also said Mr Cameron had attended talks with his counterpart Dmytro Kuleba on issues related to weapon deliveries, arms production, and maritime security in the Black Sea.

President Zelensky meanwhile hailed efforts to restart shipping routes on the Black Sea after Russia earlier this year exited a deal safeguarding grain exports from Ukraine's ports.

"We have been able to provide such protection to the western part of the Black Sea, which now enables our maritime export corridors to operate," he told representatives of countries on the Black Sea.

Mr Cameron earlier met with Deputy Prime Minister Olga Stefanishyna to discuss Ukraine's aspirations to join the US-led NATO alliance.

"The UK is clear that Ukraine's rightful place is in NATO and is working with Allies to smooth the path to Ukraine's accession by removing the need for a Membership Action Plan," Cameron was cited as saying.

The announcement of Mr Cameron's visit came as Ukraine's air force said air defence systems had downed 16 Russian attack drones overnight, as well as one cruise missile.

Russia steps up attacks on Avdiivka in east Ukraine

Elsewhere, Russia has stepped up attacks on the shattered eastern Ukrainian frontline town of Avdiivka, its mayor said.

The industrial town near the Russian-held regional stronghold of Donetsk has faced a fierce onslaught for more than a month.

"It is very hot. Indeed, in the last few days, the enemy has become more active," Vitaliy Barabash said on national television.

Volodymyr Zelensky last week described Avdiivka as one of the 'hottest' areas on the frontline

Russian troops are using armoured vehicles, targeting the industrial zone and hitting positions in the town "around the clock" to strike high-rise buildings, Mr Barabash said.

Under fire since 2014, the town has been largely destroyed by shelling.

There are 1,431 people left in the town out of a pre-war population of around 30,000, he said.

General Oleksandr Tarnavskiy, who is leading the Ukrainian counteroffensive in the south, said: "Our soldiers are firmly holding the defence in the direction of Avdiivka".

Mr Zelensky last week described Avdiivka as one of the "hottest" areas on the frontline.