Alexander Legkov led home a Russian clean sweep in the men's 50km cross-country race to ensure the host nation finished top of the Sochi medal table.
Legkov, 30, won gold by only 0.7 seconds - the second narrowest margin ever in an Olympic 50km race - to edge Maxim Vylegzhanin into silver.
Their compatriot Ilia Chernousov took the bronze, while Britain's Andrew Musgrave crossed the line in 53rd.
Victory gave Russia 12 gold medals, ensuring they finish above Norway.
The hosts later picked up a 13th gold in the men's four-man bobsleigh.
Legkov's success was his second medal of the Games after he won silver in the men's 4x10km relay.
"This is priceless," said Legkov. "It's more valuable than my life, I can't express how I feel. For 15 years I've been trying for this result."
Britain's Musgrave added: "I didn't feel so great. I am little bit ill, I had a bit of a fever last night.
"But I thought I may as well race. It is the Olympics and it comes around once every four years and it might have gone well."
Earlier, Austria's Johannes Duerr, a contender in the 50km cross-country, was suspended after failing a drugs test.