West Ham United have announced the signing of Marko Arnautovic from Stoke City on a five-year deal for a club-record fee of up to £25m, with a guaranteed £20m plus an additional £5m in potential add-ons.

Arnautovic, 28, had been agitating for a move and after rejecting two earlier bids Stoke finally relented. He will bolster the Hammers’ squad following the addition of Pablo Zabaleta and Joe Hart on loan, and the imminent transfer of Javier Hernández.

“It feels special to me to be a West Ham player,” said Arnautovic, who has 62 caps for Austria. “Everyone knows that West Ham is a big club, with big history and I’m happy to be a part of it now. I can’t wait to get started.

“I played against West Ham at the old stadium – I didn’t play last year at the new stadium because I was suspended – but I came to the game and I can only say it is a massive club with a lot of fans. They are crazy for football and this is what I like. The club is still growing, getting better and better and that’s why I’m here.”

Arnautovic joined Stoke in 2013 from Bundesliga side Werder Bremen for £2.3m and quickly established himself as a regular in the side, scoring 26 goals in 145 appearances for the club.

The West Ham joint-chairman David Sulllivan said: “We’re delighted to have completed Marko’s transfer from Stoke City. Alongside Pablo Zabaleta and Joe Hart we have brought in three players with vast Premier League experience this summer, and that was one of our key targets as we look ahead to the new season.

“Marko will bring plenty of quality to our front line and I’m excited to see him in a claret and blue shirt.”

Following Hart’s arrival, the goalkeeper Darren Randolph has moved from West Ham to the Championship club Middlesbrough for around £5m. Randolph, 30, wants to ensure he gets regular game time before a possible World Cup campaign with the Republic of Ireland next summer.