The WRU intends that Warburton will continue playing for Cardiff Blues under the new deal which signals the launch of a new arrangement for keeping key international players at the Welsh Regions.
The WRU hailed the agreement with the Wales and British and Irish Lions captain as a triumph in the best interests of all Welsh rugby.
Warburton will now enter the RBS 6 Nations campaign secure in the knowledge that his playing future is safe.
Under the arrangement the WRU intends that he will be released for Cardiff Blues games outside his Wales duties at no cost to the Region.
The contract also ensures he will be released for all Wales international duty as required but does not guarantee him selection to the squad or team.
Under the arrangement his salary will be paid by the WRU and the WRU intends that he will be released free of charge for his Cardiff Blues duties.
This means the Blues will be able to benefit from the savings and extra funds will therefore be available for them to invest back into the Region.
Sam Warburton said: “I am delighted to commit my future to Welsh rugby. I would like to thank the WRU for its commitment to me. I also want to take this opportunity to thank my agent, Derwyn Jones, who has supported and mentored me from a young age and always had my best interests at heart.
“I would further offer my thanks to my legal team at Harding Evans particularly, Dan Wilde and David Lewis who have contributed greatly to bringing these negotiations to a successful conclusion. Now that my future is secured within Wales I look forward to focusing on the Six Nations and beyond.”
WRU Group Chief Executive, Roger Lewis, added: “We have been able to strike a deal which ensures the Welsh captain will continue to play his rugby at the highest level here in Wales.
“I am extremely grateful to the Cardiff Blues Chairman, Peter Thomas for his understanding when the WRU Chairman and I met him on Wednesday to outline this proposed plan.
“Welsh rugby together cannot stand back any longer and watch its best players leave Wales. We all have to act together and act now in the best interests of the game.
“There can be no better message to current and future internationals than the decision of Sam Warburton to become the first senior player to sign a WRU National Contract and commit to Regional rugby and international rugby in Wales.
“This is all about us working together in the best interests of rugby in Wales and I am sure this will be remembered as an important moment for rugby in Wales.
“What we want is for every young rugby fan in Wales to emulate players like Sam Warburton.
“Sam is a product of our excellent player development pathway and we can now continue to reap the rewards of helping nurture his talent to the pinnacle he has achieved so far in his playing career.
“In the modern era we all have to approach each new problem with open minds and when we come up with an idea which works for Welsh rugby we have to have the confidence to implement it.
“This has been a significant week for Welsh rugby with the two Lions test captains Alun Wyn Jones and Sam Warburton committing to playing the game in Wales.”
Negotiations are progressing between the WRU and all four Regions towards agreeing a new Rugby Services Agreement and the six nations meetings over European rugby competitions continue in a positive fashion with further discussions planned for Monday.