The 27-year-old could therefore make a massive £41.6million from the length of the new contract.
"There is nothing certain about Barcelona because I am very happy at United", said Herrera on Saturday evening.
Herrera also talked about his worldwide teammate Alvaro Morata who was strongly linked with United before the Red Devils signed Romelu Lukaku.
Real Madrid are United's rival on two occasions this summer; one in a friendly for the International Champions Cup and, especially, in the European Super Cup on August 8.
"Madrid are the most powerful team of the moment", He said. They are the strongest team right now, they've won the last two Champions Leagues, but a Super Cup final always motivates you.
"I'll be just as motivated".
"Getting back into the Champions League was crucial for the club, we'll be one of the teams to beat".
It's added that Herrera may even captain United on a regular basis next season given Michael Carrick isn't expected to play every game, and so coupled with this deal, it looks as though he's set to really cement his place in the line-up and club moving forward.