President Vladimir Putin has signed a law ratifying a deal with the Syrian government allowing Russia to keep its air base in Syria for almost half a century, official documents show.

The original deal, signed in Damascus in January, sets out the terms under which Russia can use its Hmeymim air base in Latakia Province which it has used to carry out air strikes against forces opposing President Bashar al-Assad.

Putin approved the agreement on Wednesday, after the two chambers of the Russian parliament backed it earlier this month, according to the government's official information portal.

The document says Russian forces will be deployed at the Hmeymim base for 49 years with the option of extending that arrangement for 25-year periods.

The base has been at the heart of Moscow's military foray since it intervened in the conflict in September 2015, helping turn the tide in favor of Assad, one of Russia's closest Middle East allies.