Besiktas have completed the loan signing of Demba Ba from Chinese Super League side Shanghai Shenhua.
The 31-year-old has moved to the Turkish Super Lig club for the remainder of the season, having previously played for Besiktas in 2014-15.
Besiktas confirmed the news in an official statement, writing "Demba Ba has joined on temporary transfer until May 31. No compensation will be paid to him or his club."
West Ham had been interested in bringing the former Newcastle and Chelsea forward back to the Premier League, but withdrew their interest when Ba suffered a broken leg while playing for Shanghai.
He had previously spent half a season with the Hammers, but chairman David Sullivan revealed that Ba's injury prevented the move from happening.
"We looked to bring Demba Ba back this window but were told he was 3 weeks from playing after recovering from injury," Sullivan told talkSPORT.
On Tuesday, Ba was unveiled at a press conference by Besiktas, and told reporters "I will try to do the best that I can. I hope that this period will be more successful."
In his previous spell at the club Ba scored 18 goals in 29 league appearances for the Black Eagles, but could only help Besiktas to third spot behind Galatasaray and Fenerbahce.
Manager Senol Gunes added four new players during the window, with Ryan Babel, Ersan Gulum and Matej Mitrovic also joining the Turkish champions.