West Ham United have beaten Wigan Athletic in the race to sign Real Mallorca defender Ivan Ramis, the player's Spanish club have confirmed.
Wigan chairman Dave Whelan confirmed to ESPN last week that his club had made an offer of "around £4 million" for Ramis, but the 26-year-old is now set to join the Hammers.
"Mallorca and West Ham have reached an agreement for the transfer of Ivan Ramis," the La Liga club said in a statement on Saturday night. "The Mallorcan defender has the permission of the club to have a medical with what will be his new team."
Mallorca did not mention any fee for Ramis but said they will "achieve the economic objective for which they have been working for over recent weeks.''
Ramis, who has played almost 200 games for Mallorca and Valladolid, has been linked with a host of clubs including Everton, Sunderland, Aston Villa and Celtic.
Earlier on Saturday, Ramis told the Daily Mirror: "I have played my last match for Mallorca because there is a new and very interesting offer for me. Wigan is not the best proposition for me."
If Ramis completes his move to West Ham he will join a host of new faces at Upton Park this summer, with manager Sam Allardyce having already brought in goalkeepers Jussi Jaaskelainen, Stephen Henderson and Raphael Spiegel, midfielder Mohamed Diame and forward Modibo Maiga.