An entrance of the Russian embassy is closed in Berlin, Germany, May 31, 2023. (PHOTO / AP)

BERLIN – The German government would close four out of the five Russian consulates in the country by revoking their licenses after Moscow limited the number of German officials in Russia, according to the German Federal Foreign Office.

The Russian embassy in Berlin, as well as one consulate general, will continue to operate. The measures will take effect from the end of the year, the office said.

On April 22, the Russian Foreign Ministry said it had notified German Ambassador to Russia Geza Andreas von Geyr that the maximum number of German diplomatic staff in Russia would be "significantly" limited in response to Germany's "hostile" actions

At the same time, Germany's Foreign Office also announced it is closing down three of its consulates general in Russia.

READ MORE: Ukraine gets first batch of Leopard 2 tanks from Germany

Regarding Russia's diplomatic presence in Germany, the "decision applies reciprocally to ensure a balance of the two sides' presences, both in terms of personnel and structure," the foreign office said.

On April 22, the Russian Foreign Ministry said it had notified German Ambassador to Russia Geza Andreas von Geyr that the maximum number of German diplomatic staff in Russia would be "significantly" limited in response to Germany's "hostile" actions.

ALSO READ: Russia says to expel German diplomats over 'hostile' actions

Germany and Russia have repeatedly expelled each other's diplomats. However, the situation has worsened considerably since the start of the crisis in Ukraine, which led to massive sanctions against Russia by the EU.