NEWCASTLE, England — Rafael Benitez is leaving Newcastle United after just over three years in charge.

The Spanish coach will depart when his contract ends on Sunday after Newcastle said efforts to extend his stay failed.

The club says "it has not been - and will not be - possible to reach an agreement with Rafa and his representatives."

Benitez couldn't stop Newcastle being relegated when he joined in March 2016, but helped the team immediately bounce back into the English Premier League the following season. Finishing 10th and 13th in the last two seasons cemented Newcastle's place in the top flight and Benitez's status as a fan favourite.

The club says, "We would also like to thank our supporters, players and staff for their patience during a period of uncertainty."

Benitez, who won the Champions League when in charge of Liverpool in 2005, has been reportedly offered a contract worth £12 million-a-year at Chinese club Dalian Yifang per London AFP.

___

More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports