According to the club, the deal was agreed to almost a month ago and has only now been made public.
Since former teammate Cristiano Ronaldo left for Real Madrid last summer, the Serb had been linked with a move to the Santiago Bernabeu and, to a lesser extent, Italy, with Juventus said to be interested in bringing in the central defender.
Manchester United chief executive David Gill, speaking to the club's television station, confirmed the agreement:
Gill told MUTV: "I am very pleased to confirm that we agreed terms with Nemanja three or four weeks ago on a new long-term deal with the club."
The 28-year-old is now set to stay at Old Trafford into his thirties, having joined the club in 2006 after a short stint with Russia's Spartak Moscow. Vidic began his career in Serbia with Red Star Belgrade, where he debuted in 200 as an 18-year-old.
Since moving to Manchester, Vivic has been a member of three league and one European championship, making 186 appearances while accumulating 13 goals.
Regarded as one of the best central defenders in England, Vidic will be critical to United's title hopes, his presence helping to augment the continued injury problems of Rio Ferdinand, his central defense partner who was limited to 13 league appearances last season.