MOSCOW — Russia has signed an agreement with Sudan to establish a navy base in the African nation for at least a quarter century, part of Moscow's efforts to expand its global reach.

The deal published Tuesday on the official portal of government documents allows Russia to simultaneously keep up to four navy ships, including nuclear-powered ones, in Port Sudan on the Red Sea. The agreement lasts for 25 years and could be automatically extended for 10-year periods if none of the parties objects to it.

The document states that the Russian navy base should "help strengthen peace and stability in the region" and isn't directed against any third parties. In exchange for Sudan's permission to set up the base, Russia will provide Sudan with weapons and military equipment.

The new agreement is part of Moscow's efforts to restore a regular naval presence in various parts of the globe. The Russian military footprint withered after the 1991 Soviet collapse amid economic woes and military funding shortages, but President Vladimir Putin has moved steadily to rebuild the nation's military might amid tensions with the West.

The Russian navy already has established a major presence in the Mediterranean, thanks to a naval base in the Syrian port of Tartus, currently the only such facility that Russia has outside the former Soviet Union.

Russia has waged a military campaign in Syria since September 2015, allowing President Bashar Assad's government to reclaim control over most of the country following a devastating civil war.

In 2017, Moscow struck a deal with Assad to extend its lease on Tartus for 49 years. After signing the agreement that allows Russia to keep up to 11 warships there, it has moved to modernize and expand the facility.

As part of Putin's efforts to beef up the military, the Russian navy in recent years has revived the Soviet-era practice of constantly rotating its warships in the Mediterranean.