The pay TV service's subscribers lost access to the channels at the end of February 2007 after a spat between the two companies that escalated over the amount that Sky wanted to charge Virgin Media to have access to the services.
Sky sparked the dispute when it asked Virgin to pay £48.4m to carry its channels in 2007, an increase from £23.6m in 2006. It then reduced the amount it paid to carry Virgin's channels from £35.6m in 2006 to £5.1m in 2007.
The new deal secures the carriage of BSkyB's basic package of channels until June 2011, starting from November 13. This includes Sky1, Sky2, Sky3, Sky News, Sky Sports News, Sky Arts 1, Sky Arts 2, Sky Real Lives and Sky Real Lives 2.
At the same time, Sky subscribers will continue to have access to Virgin Media TV's basic channels, including Living, Bravo, Virgin 1 and Trouble.
The agreements include fixed annual carriage fees for the channels with both channel suppliers able to secure additional capped payments if their channels meet certain performance-related targets.
After the rift, Virgin Media brought a legal case against BSkyB, accusing it of anti-competitive behaviour. Sky was countersuing, but today they said that all proceedings against each other were being terminated.
Virgin Media said that it was pleased that the "negotiations" were now closed.
Neil Berkett, CEO of Virgin Media, said: "I believe this agreement represents a fair deal and is the right thing for our customers. We recognise the quality and popularity of Sky's channels and look forward to welcoming them back to Virgin Media's TV service.
"We are also pleased to secure Sky's continued carriage of the VMTV channels until June 2011."
Jeremy Darroch, CEO of Sky, was equally pleased: "This is great news for Sky and Virgin Media customers alike.
"We want our channels to be enjoyed by as many people as possible so we're delighted to secure their return to the Virgin Media platform."