BERLIN—Russia’s ruling party signed a five-year “cooperation agreement” with the anti-immigrant Freedom Party of Austria, one of the clearest signs that the Kremlin is seeking to deepen ties with nationalist and antiestablishment forces in the West.

The two-page agreement, reached in Moscow after Freedom Party leaders met with officials from Russian President Vladimir Putin’s United Russia party, spells out a common commitment to holding regular joint meetings and public events while working to strengthen social and economic...