Cesc Fabregas has signed a five-year contract with Barcelona in a deal worth a potential £35m to Arsenal.

The former Gunners captain, 24, said he moved back home to take up "the greatest challenge of my life."

Barcelona have written in a buy-out clause in the midfielder's contract set at 200m euros (£175m).

Fabregas added: "I have waited a long time for this moment. After eight years away I hope to leave you all with many great memories."

Fabregas and Arsenal

Became club's youngest player aged 16 years and 177 days against Rotherham United in League Cup in October 2003

Went on to make 303 appearances in eight years, scoring 57 goals

Part of team which beat Manchester United on penalties in 2005 FA Cup final

Made Arsenal captain in November 2008

Barcelona will pay Arsenal 29m euros (£25.4m) up front for Fabregas, with the player contributing 1m euros (£880,000) from his salary each year of the initial contract.

Arsenal will also receive 5m euros (£4.4m) if Barcelona win two La Liga titles and one Champions League title in the next five years.

Fabregas won one major honour with Arsenal - the 2005 FA Cup.

"I was just a servant and spent eight years there when I gave absolutely everything", he said.

"It didn't show in the cabinet, I only won one FA Cup really, and this is the biggest regret I will have in my career, probably, not to be able to lift a trophy as Arsenal captain.

"I will always be an Arsenal fan because what they have done for me is unbelievable and I will never forget it."

Fabregas also paid tribute to Gunners boss Arsene Wenger, saying: "Wenger is a special person to me. He'll always be a second father to me.

"I think if Arsenal want to keep being the club they are then they have to always be under his control, because he's the best, everyone respects him, and for me, he will always be the best person that I've met in football.

"I'll never be able to find the words to express my thanks for what he did for me."

Later Fabregas thanked Arsenal fans on Twitter: "To all Gunners: A big thank you for your unconditional support during the last 8 yrs. Just say that I will always carry you in my heart!"

Analysis

Arsenal have lost one of their most talented ever players, but Fabregas's departure will provoke as much relief as it does disappointment among the club's fans. The way he and Barcelona bullied Arsenal into submission reflected poorly on both. Arsenal deserved better and it is now time for them to move on. Finding a replacement for Fabregas (and soon Samir Nasri) will not be easy, and one wonders how much damage this saga has done to Arsene Wenger's motivation

Fabregas, who has 58 caps for Spain, said he was ready to make his debut in Wednesday's Spanish Super Cup final second leg against rivals Real Madrid, but he does not expect to walk into the Barcelona team.

"I come here with great humility because I know I have a lot to learn and I can learn a lot from this coach and this great team," he said.

"I know I can enjoy it and make a contribution. I'm going to try very hard to make this team even more competitive and strong."

The finalisation of the Fabregas deal brings to an end one of the most protracted transfer sagas in recent football history.

"We have lost a world-class player," said Wenger. "We are sad about it because we tried to keep him."

Commenting on what he described as "very tough" negotiations, Barcelona coach Pep Guardiola said Fabregas had benefited greatly from his time at Arsenal, adding: "Cesc grew up with Barcelona but he became a huge player thanks to Wenger and Arsenal."