The relationship between Russia and Azerbaijan has evolved over two centuries, during which Azerbaijan spent most of the time in the Russian Empire and then as part of the Soviet Union until it broke up in 1991 and both emerged as independent states. The two countries established diplomatic relations in April 1992 and then signed a free-trade agreement that September.