Real Madrid have signed Real Sociedad midfielder Asier Illarramendi after agreeing to meet the Spain Under-21 international's buy-out clause.
Sociedad announced Madrid had informed the Liga de Futbol Profesional (Spanish Football League) they would pay the clause, reported to be 39million euros (Â£33.6m), to take the 23-year-old to the Bernabeu.
The two clubs had been in negotiations regarding a fee for a player Madrid believe to be the long-term replacement for Xabi Alonso in a defensive midfield role, but had failed to find a resolution.
A Madrid statement read: "Real Madrid have signed Asier Illarramendi, who is now tied to the club for the next six seasons. The player will be presented after undergoing the relevant medical tests."
Illarramendi rose to prominence as a key man at Sociedad last season, playing an important part as the San Sebastian club finished fourth in the Primera Division, securing a place in the Champions League in the process. He then played every game as Spain Under-21s won the European Under-21 Championship in Israel earlier this summer.
He becomes Madrid's fourth signing of the summer, after fellow Spaniards Isco and Dani Carvajal joined from Malaga and Bayer Leverkusen respectively, and the club made their loan move for Brazilian Casemiro permanent. Sociedad president Jokin Aperribay confirmed the move at a press conference, but added they did not want to sell the player.
"This morning the LFP called to tell us that Real Madrid have activated Illarramendi's buyout clause," he said. "We have a very important year ahead of us with a young coach (Jagoba Arrasate) and we wanted all our players to stay.
"We told Real Madrid that we wouldn't negotiate, and we said the same thing to Asier and his agents. We fought very hard for him to stay and it's been a difficult few days because we really wanted him to stay. We wish him all the best and hope he doesn't forget his time at La Real."
Illarramendi, who has spent his entire youth and professional career at Sociedad, explained he was leaving the Basque side with a heavy heart, but admitted he could not turn down the chance to join Real Madrid.
"It hasn't been an easy decision, it has been very difficult for me to decide because Real Sociedad have given me so much," he said. "I was on holiday when we started to hear about the interest from Real Madrid. There were contacts, we mulled it over and came to the conclusion that it was an offer we couldn't refuse. It's a unique opportunity."