There were two losers to World War I: Germany and Russia. Because they felt disadvantaged by the Versailles conditions, both ended up in an isolated position. Therefore it was no so strange they tried to approach each other. Talks resulted in signing the Treaty of Rapallo in 1922.
The treaty confirmed the re-establishment of diplomatic relations between the countries. But the most important deal was a secret clause that enabled the German Reichswehr (the army) to produce tanks, airplanes and poison gas weapons on Soviet soil, thus evading the restrictions on German weaponry by the Treaty of Versailles. (In turn the Soviets received substantial economic assistance). Without a doubt the Treaty of Rapallo has set the basis for Hitler's military power.
The Treaty of Rapallo was a lesson to the rest of the world in more than one respect. This pact of two individually relatively weak countries was so powerful that it became an immediate threat to others. Especially Poland, that felt sandwiched, situated right in between the two. The Polish fear was justified: it would be the first victim when World War II broke loose.
Some passages from the Treaty of Rapallo (thanks to http://www.geocities.com/Athens/Troy/1791/rapollo.html):
The German Government, represented by Dr Walther Rathenau, Minister of State, and the Government of the Russian Socialist Federal Soviet Republic, represented by M. Tchitcherin, People's Commissary, have agreed upon the following provisions:
The two Governments are agreed that the arrangements arrived at between the German Reich and the Russian Socialist Federal Soviet Republic, with regard to questions dating from the period of war between Germany and Russia, shall be definitely settled upon the following basis:
- The German Reich and the Russian Socialist Federal Soviet Republic mutually agree to waive their claims for compensation for expenditure incurred on account of the war, and also for war damages, that is to say, any damages which may have been suffered by them and by their nationals in war zones on account of military measures, including all requisitions in enemy country.
- Legal relations in public and private matters arising out of the state of war, including the question of the treatment of trading vessels which have fallen into the hands of either Party, shall be settled on a basis of reciprocity.
- Germany and Russia mutually agree to waive their claims for compensation for expenditure incurred by either party on behalf of prisoners of war. Furthermore the German Government agrees to forego compensation within regard to the expenditure incurred by it on behalf of members of the Red Army interned in Germany. The Russian Government agrees to forego the restitution of the proceeds of the sale carried out in Germany of the army stores brought into Germany by the interned members of the Red Army mentioned above.
Diplomatic and consular relations between the German Reich and the Russian Socialist Federal Soviet Republic shall be resumed immediately. The conditions for the admission of the Consuls of both Parties shall be determined by means of a special agreement.
Both Governments have furthermore agreed that the establishment of the legal status of those nationals of the one Party, which live within the territory of the other Party, and the general regulation of mutual, commercial and economic relations, shall be effected on the principle of the most favoured nation.
The two Governments shall co-operate in a spirit of mutual goodwill in meeting the economic needs of both countries. In the event of a fundamental settlement of the above question on an international basis, an exchange of opinions shall previously take place between the two Governments.
Original text done in duplicate at Rapallo on April 16, 1922