BUDAPEST, Hungary — Germany will not provide weapons to Ukraine and supports negotiations and a diplomatic solution to the conflict between the government in Kiev and Russian-backed rebels in eastern Ukraine, German Chancellor Angela Merkel said Monday.

“It is my firm belief that this conflict cannot be solved militarily,” Merkel said after meeting with Hungarian Prime Minister Viktor Orban in Budapest.

She said she prefers economic sanctions as decided by the European Union and negotiations to “solve or at least mitigate the conflict.”

Fighting in eastern Ukraine has claimed more than 5,100 lives since April and displaced 900,000 people. Despite a September cease-fire and a period of relative calm in December, the fighting has intensified in recent weeks.

Orban, who has frequently noted the damage to Hungarian exports, especially in the agricultural sector, caused by the sanctions, said Hungary also backs a peaceful solution and will not provide any weapons to Ukraine.

He mentioned Hungary’s great dependency on Russian energy supplies arriving through Ukraine and said that the 200,000 ethnic Hungarians living in western Ukraine, near the border with Hungary, are also a factor shaping Hungary’s policy.

During her visit to Budapest, Merkel was also expected to meet with representatives of German companies operating in Hungary, visit the Dohany Street Synagogue and a nearby Holocaust memorial, and speak at the German-language Andrassy University.

Merkel’s visit to the synagogue, the largest in Europe, “shows that the situation of Europe’s Jews, including the fate of Hungary’s Jewish community, is an important issue for the German government,” Andras Heisler, head of the Federation of Hungarian Jewish Communities, said ahead of the visit.