Pepe joined Besiktas as a free agent in 2017 after 10 years at Real Madrid. Getty

Pepe left Besiktas club staff a cash tip as a parting gesture after agreeing to have his contract with the Turkish club terminated, sources have told ESPN FC.

The former Real Madrid defender's deal was set to run until June 2019 but he has left with the Istanbul-based club in the process of slashing their wage bill to reduce expenses amid struggles with growing debts.

Reports in Spain over the weekend had claimed Pepe had covered the wages of several members of staff who had not been paid.

However, sources told ESPN FC that, while the Portugal international did not make up for unpaid salaries, he did leave an envelope with a large tip as a gesture to the maintenance, kit and cooking staff at Besiktas.

Pepe enjoyed a close relationship with the staff at the club and has paid out generous tips in the past as well, the source added.

Considering the strength of the Euro to the Turkish Lira (1/6.1 on Dec. 17), the payment will serve as a considerable bonus to their monthly wage.

Thank you to all @besiktas fans, administration, teammates and staff for believing in my work🙏🏻 You @besiktas deserve the BEST . I will never forget you @vodafonepark 📣🇹🇷

.

Remember ... No Bad Days🦅#P3PE #Pepe5 #NoBadDays pic.twitter.com/fz8a62ouK2 — Pepe (@officialpepe) December 17, 2018

Pepe ended up leaving Besiktas on good terms with the club and attended the 2-2 draw against Trabzonspor where he bid a final farewell to the fans at the Vodafone Park Stadium.

Pepe was one of the highest paid players in the Besiktas squad. The 35-year-old signed a two-year deal worth €9.5 million before bonuses when he joined in 2017 after his Real Madrid contract expired. The experienced centre-back also received a bonus of €4,000 per game.

Pepe was part of the Besiktas side that topped their Champions League group last season before being eliminated by Bayern Munich in the round of 16. The Black Eagles did however, struggle towards the end of the season, finishing fourth in the league, four points behind reigning champions Galatasaray.

Besiktas have yet to release an official statement confirming the centre-back has left.

The Black Eagles also parted ways with Spanish striker Alvaro Negredo, who joined Dubai-based club Al-Nasr in September. Netherlands international Ryan Babel, meanwhile, has just six months remaining on his contract and will not be offered a new deal, a source told ESPN FC. The Dutchman has been told to find a new club.

Besiktas are third in the Super Lig, eight points behind leaders Basaksehir, but crashed out of the Europa League in the group stage.