The 26-year-old Cameroon international left Arsenal for Barcelona in 2012, but he failed to nail down a first-team place at Camp Nou and made only 39 appearances over the past two seasons.

He was paraded on the pitch at Upton Park prior to West Ham's home game against Southampton on Saturday.

"I'm very happy to be here and very happy to see the guys and the fans today and to start to do my job for West Ham United," Song told the West Ham website.

"I think this is very important for me to be coming back to London to West Ham United, which is a club with ambition to build a new stadium and become a big club. I am very excited to be part of this project.

"For me, when I was in Spain, I always said that if I was to leave one day, I would return to the Premier League."

Born in Douala, Song began his professional career with French club Bastia and joined Arsenal on a permanent basis in 2006 after spending a year at the club on loan.

He made 206 appearances for Arsenal in all competitions before joining Barcelona, where he won the league title in 2013.

He has won 47 caps for Cameroon and played at the last two World Cups, although he exited the last one under a cloud after being sent off for elbowing Croatia's Mario Mandzukic in the back in their group game.

Amid reported interest from other European clubs, Song said that he had been persuaded to move to Upton Park by a conversation with manager Sam Allardyce.

"When I spoke to the manager, he gave me very good advice," Song explained.

"I had a very good chat with him and that's why I am coming here. We have to do better than last season. I think the club has very good ambition and I hope we can maybe catch the European positions, because that would be very good for the club."

Song is West Ham's eighth close-season signing after Mauro Zarate, Cheikhou Kouyate, Enner Valencia, Diafra Sakho, Carl Jenkinson, Aaron Cresswell and Diego Poyet, and could make his debut at Hull City after the international break.