MOSCOW  The presidents of Russia and Cuba signed a strategic partnership and several other documents on Friday aimed at rekindling an alliance that collapsed after the cold war. They pledged to expand cooperation in agriculture, manufacturing, science and tourism, but studiously avoided a public discussion of military ties.

It had been nearly a quarter century since a Cuban leader had set foot on Russian soil. President Raúl Castro’s visit to Moscow this week had little of the pomp and propaganda of the cold war days, when he and his brother Fidel were greeted with parades in Red Square and Soviet leaders affectionately referred to Cuba as the “island of freedom.”

But almost two decades after a crumbling Soviet Union hastily withdrew financial and ideological backing from Cuba, Russia is seeking to expand economic ties with the island and possibly forge stronger military relations in an echo, as yet still faint, of an alliance that lasted some 30 years.

It is part of a larger Russian push into Latin America to secure new markets, and also to swipe at the United States for what Moscow considers Washington’s meddling in Russia’s historic sphere of influence, particularly in Ukraine and Georgia, former Soviet republics.