Demba Ba has finally completed his move from Hoffenheim to West Ham, the German club have confirmed.
The Senegal striker, who announced the transfer on his official website earlier this week, has signed a deal with the Hammers until June 2014.
"We are happy we can close the Demba Ba chapter. After much to-ing and fro-ing this solution is the best for all concerned," Hoffenheim manager Ernst Tanner told their official website.
Ba had earlier this month appeared set for a move to Stoke only for the deal to fall through because of a failed medical.
The 25-year-old has scored six goals in 17 games for Hoffenheim this season.
Ba joined the Hammers in training on Friday morning at Chadwell Heath after completing the formalities of his deal.
"It was a long story but now I'm happy because it had a really good end and I am glad to be here," he told West Ham TV.
"I'm going to give everything to West Ham United."