London: Wayne Rooney became Manchester United's all-time leading scorer as his last-ditch wonder goal rescued a 1-1 draw at Stoke, while Pep Guardiola's problems mounted as Tottenham came from two down to force a 2-2 draw at Manchester City on Saturday.

Rooney surpassed Bobby Charlton's tally of 249 goals for United when he struck with a superb effort deep into stoppage-time at the Britannia Stadium.

The 250th goal of Rooney's glittering United career was just the 31-year-old's fifth of a difficult season and came as a timely reminder of the striker's class after he was relegated to the role of a fringe player for long periods this term.

Wayne Rooney celebrates after breaking the all-time goalscoring record for Manchester United. Reuters

It was also much needed by United, who had fallen behind in the 19th minute when Juan Mata deflected Erik Pieters' shot into his own net.

Jose Mourinho sent on Rooney in the 67th minute and the England star, who had gone two games without a goal since equalling Charlton's record in an FA Cup win over Reading on January 7, wasted his first chance to make history when he headed wide from six yards.

But Rooney refused to be denied and, with Charlton watching from the stands, his magic moment arrived four minutes into stoppage-time when he curled a superb free-kick past Stoke goalkeeper Lee Grant and into the top corner.

Rooney's gem extended United's unbeaten run in the league to 13 matches, but lost in the euphoria of his landmark strike was a disappointing result that leaves his team three points adrift of the top four.

"It means a hell of a lot. It is a great honour and I'm very proud," said Rooney, who signed for United from Everton in 2004.

"It is not something I expected when I joined. The players who have played for this club have been world class.

"To be all-time top goalscorer is a huge honour."

Charlton saluted Rooney's achievement, saying: "I can honestly say I'm delighted for Wayne. He deserves his place in the history books.

"He is a true great for club and country."

Mourinho added: "Before him the record belonged to a legend of English football. Now Wayne becomes a legend of Manchester United."

At Eastlands, City took the lead in the 49th minute when Tottenham goalkeeper Hugo Lloris raced off his line in a failed bid to intercept Kevin de Bruyne's pass, allowing Leroy Sane to steer his shot into the empty net.

Chastening

Lloris was culpable again five minutes later as the France international spilled Raheem Sterling's cross and De Bruyne punished the mistake with a simple finish.

But Dele Alli sparked Tottenham's revival with a close-range header in the 58th minute and, after Sterling had a penalty appeal controversially turned down, South Korea's Son Heung-Min swept home to complete the comeback in the 77th minute.

It was another chastening experience for City boss Guardiola, who suffered the heaviest league defeat of his managerial career last weekend in a 4-0 loss at Everton.

"It was an outstanding performance, but it's a pity what happened," Guardiola said.

"We created more chances but were not able to win and again the right decisions were against us."

Fifth placed City are languishing nine points adrift of leaders Chelsea, while second placed Tottenham lie six points behind the table toppers, who host Hull on Sunday.

Liverpool's title challenge suffered a major blow as lowly Swansea enjoyed a shock 3-2 victory at Anfield.

Fernando Llorente put Swansea ahead in the 48th minute and struck again in the 52nd minute before Roberto Firmino scored for Liverpool three minutes later.

Firmino drew Liverpool level with a fine finish in the 69th minute, but Gylfi Sigurdsson struck in the 74th minute after more sloppy play from the Reds rearguard.

Swansea had started the day at the bottom of the table, but their first ever league win at Anfield lifted them out of the relegation zone and condemned Liverpool, seven points behind Chelsea, to their first home league defeat for 12 months.

"The defending around all three goals wasn't good enough, 100 percent. Their third is a big mistake," Reds boss Jurgen Klopp said.

Seamus Coleman's 87th minute strike gave Everton 1-0 win at Crystal Palace that plunged the hosts into the relegation zone.

Andy Carroll showed West Ham can thrive without want-away star Dimitri Payet as his brace inspired a 3-1 victory at Middlesbrough.

Sunderland slumped to the bottom of the table after a 2-0 defeat at West Bromwich Albion, while Bournemouth drew 2-2 with Watford.