Hammers co-owner David Gold announced the 58-year-old would stay on at Upton Park on his personal Twitter account.
"I am delighted to announce that our manager Sam Allardyce has signed a new two year contract," Gold said.
Allardyce revealed on Friday he was set to put pen to paper on a new contract, having guided the Hammers to guaranteed Barclays Premier League safety in their first season back in the top flight.
He said: "I will be signing my contract very shortly. Early next week will be the right time."
The former Bolton and Blackburn boss insisted in March he would be penning a new deal "very soon" after productive talks with Gold and fellow co-owner David Sullivan, but the two-month wait to sign the contract offered raised doubts over his future.
But Allardyce said the hold-up was down to wading through vast swathes of legal jargon and the need to secure survival, rather than because of any problem with the club's owners.
"There were processes we had to go through and put it together in the right way, which it has now," Allardyce said.
"I never thought there would be any problem - and there hasn't.
"There has been some issue with the legal jargon in the contract which I couldn't understand so that has to go to both sides' lawyers to agree and then it gets signed. The size of a manager's contract is pretty substantial in terms of responsibilities."
- Sports & Recreation
- Sam Allardyce