Newcastle United confirmed details of the wide-ranging deal today (9 October). Wonga will become the club's shirt sponsor from the 2013/14 season.
The deal could be worth around £15m year to Newcastle United.
Wonga had initially just been interested in becoming the club's shirt sponsor. But after senior Wonga executives met with the club's fans the company subsequently decided to buy the naming rights to the 52,000 capacity stadium as well.
A spokesperson for Wonga said the company "had no intention of using the Wonga name" in the naming of the stadium, so to appease fans decided to revert back to the St James Park name.
The football club’s owner Mike Ashley sparked anger from fans in November last year, when he revealed the name of St James Park had been changed to the Sports Direct Arena, named after Ashley’s sportswear company.
Now the St James Park name is back, which will be widely applauded by fans.
Derek Llambias, managing director of Newcastle United, said: "We are building a club that can regularly compete for top honours at the highest level.
"Throughout our discussions Wonga’s desire to help us invest in our young playing talent, the local community and new fan initiatives really impressed us and stood them apart from other candidates."