Good riddance to bad rubbish.

David Moyes has walked away from Sunderland after he guided them to relegation and showed no class as manager.

The club made the announcement on Monday.

The 54-year-old Scot succeeded Sam Allardyce last July and oversaw a desperate season that in which Sunderland finished 16 points adrift of safety at the foot of the table.

“I would like to thank (chairman) Ellis Short and the board for giving me the opportunity to manage Sunderland and the fans for always being so passionately supportive of their club,” Moyes said in a statement.

“I wish the players and my successor well in their efforts towards promotion back to the Premier League.”

Sunderland’s relegation to the Championship after 10 years in the top flight was confirmed following a 1-0 home defeat by Bournemouth last month.

Moyes informed Sunderland officials of his decision to leave at a meeting in London on Monday.

His departure completes a sorry few weeks for the former Everton manager, who has been charged by the Football Association after jokily threatening to “slap” a female reporter.

It is his third successive short-lived stint at a club, following previous disappointments at Manchester United, where he lasted just 10 months, and Real Sociedad.