Marko Arnautovic has performed a dramatic U-turn and pledged his future to West Ham.

The previously want-away forward released a statement on Instagram underlining his commitment to the club, after weeks of speculation over his future and a potential move to Guangzhou Evergrande in China.

Indeed the club were prepared to let the 29-year-old leave for £45m and have targeted Celta Vigo’s Maxi Gómez as a replacement.

The manager, Manuel Pellegrini, had concluded that Arnautovic’s desire to move to China had left him unable to rely on the 29-year-old. He dropped the Austrian for last week’s defeat by Bournemouth and has left him out again for Saturday evening’s FA Cup tie at AFC Wimbledon.

However, late on Friday night Arnautovic took to Instagram to clear up the confusion. “Dear West Ham fans, I guess it is no secret that there has been an offer for me and I have to admit the offer was a very tempting one for me and my family,” he wrote.

“I am a professional footballer and the only thing I know in life is to play football. It is clear that London and West Ham feels like home and I hope the West Ham fans have always seen that. The club has pointed my career in the right direction since I joined and therefore I want to put the offers aside, help the club to climb as high as possible in the table and try to win the Cup.

“Let’s focus on the rest of this season together and let them bubbles fly.”

Pellegrini had not been convinced by Arnautovic’s efforts in training this week and is understood to have given the club’s board the green light to sell the striker if their valuation was met. West Ham are open to letting Arnautovic leave in the summer and remain in talks with Celta over Gómez, whose contract contains a £43.5m release clause. The Spanish club, however, are battling relegation from La Liga and want to keep the 22-year-old. Intriguingly, one possibility could be a deal being done in this window before loaning him back until the end of the season.

West Ham have been unimpressed with Arnautovic’s behaviour since receiving Guangzhou’s original offer of €35m this month. They have not welcomed the interest in one of their most important players and rejected the Chinese Super League club’s second offer of €40m last week. The deal would have seen Arnautovic receive £40m over a four-year contract, a large upgrade on his West Ham wage of £90,000 a week. Shanghai SIPG, the CSL champions, have also shown an interest.

Pellegrini will have to reintegrate Arnautovic into the squad now, with few forward options available. Andy Carroll is out of contract at the end of the season, Javier Hernández wants to join Valencia and Lucas Pérez has fallen out of favour. Arnautovic should return to the side to face Wolves on Tuesday.