Tajikistan has allowed Russia a 30-year extension on a Soviet-era military base seen as a bulwark against Islamist militancy and drug-trafficking.
The two countries' defence ministers signed an agreement in the Tajik capital Dushanbe to extend the lease, due to expire in 2014, until 2042.
Russia keeps a division of 7,000 soldiers in the Central Asian republic, which borders Afghanistan.
The 201st Motor Rifle Division's chief task is to guard the border.
Russian President Vladimir Putin was in Tajikistan to witness the signing of the deal with his counterpart, Emomali Rakhmon.
Commenting before the ceremony, an aide to Mr Putin, Yuri Ushakov, said Russia was getting the extension on Base 201 "virtually free". There had been rumours of financial disagreements.
The base is spread over three locations - Dushanbe, Kulyab and Kurgan-Tyube.
Tajikistan, a mountainous mainly Muslim republic with the highest poverty levels in the former USSR, relies heavily on labour migration to Russia.
Remittances from Russia in 2011 totalled $2.86bn (£1.8bn; 2.2bn euros), or 43.9% of the country's GDP, Reuters news agency reports.
On Friday, the two countries also signed an agreement on easing some of the visa restrictions for Tajik migrant workers coming to Russia.
The border is a major route for the traffic in Afghan heroin to Russia while concern about Islamist militancy spreading from Afghanistan has increased with the approach of the Nato-led coalition's withdrawal of troops.
Relations were also strained last year when Tajik officials impounded two Russian cargo planes which were returning from Afghanistan via Tajik territory after a humanitarian aid assignment.
The two pilots, a Russian and an Estonian, were kept in jail for eight months on charges of smuggling plane parts until Moscow began a crackdown on illegal migrants from Tajikistan.
Mr Rakhmon, who has ruled Tajikistan for 20 years, faces an election next year.
Zafar Abdullayev, a Dushanbe-based political analyst, told Reuters news agency: "It's important to Rakhmon to remain in power in 2013 and the Kremlin's support will be decisive."
Mr Putin, who turns 60 on Sunday, made a present of a Russian sniper rifle to Mr Rakhmon, whose 60th birthday fell on Friday.
"I always knew that you were a wise person and that you invited us on your birthday, enticed us, you could say," the Russian leader joked. "Because you can't refuse anything on someone's birthday and we will have to sign anything you ask us to."