West Ham United are delighted to announce the signing of midfielder Gary O'Neil.

The 27-year-old arrives on a two-and-a-half year contract from npower Championship side Middlesbrough for an undisclosed fee. The midfielder described his move as "coming home", having been brought up in London and spent two years learning his trade in the Hammers Academy in his early teens, working with Tony Carr and his staff.

O'Neil was also well known to Avram Grant and coaches Paul Groves and David Coles from his time at Portsmouth and also played alongside Scott Parker and Carlton Cole in his England Under-21 days. After a late-night medical and signing his paperwork on Tuesday morning, he will be eligible for Wednesday night's Carling Cup semi-final return at Birmingham City.

He said: "I am really pleased to sign. It all happened very quickly. I played for Middlesbrough at the weekend and didn't know anything was going to happen. It has all gathered pace since then. There was also a big rush to do it quickly when they realised I wasn't cup-tied.

"I enjoyed my time at Middlesbrough, the fans and staff were really good but it has been difficult time on the pitch. It is nice to be back in the Premier League and play at the top level, which everyone wants to do. I am London born so it is good to come home.

"It is great that the club have such a massive game to look forward to. I haven't trained yet with the team so it is up to the manager of course if he wants to use me. I will take it one step at a time but it is a big game and it could be a case of straight in at the deep end if involved.

"I've watched the team a lot this season. I know Avram, Grovesy and Colesy from Portsmouth. It is a great side with top players but they just suffered from a tough start. I know we have enough quality to get out of it. I have been in a couple of relegation battles, including at Portsmouth, so hopefully that experience will help.

"It is always a bit nerve-wracking going to a new club but i should settle in quickly. I did my schoolboy stuff here for a couple of years when I was 13-14 and trained on a Tuesday and Thursday under Tony's staff. It was quite good and it helped me a lot in my career before I went to Portsmouth."

O'Neill, a versatile and whole-hearted performer capable of playing in the centre of midfield or on either flank, represents the club's second capture of the January transfer window following the arrival of Wayne Bridge.

The former Portsmouth trainee has made more than 300 senior appearances in all competitions, having originally made his Pompey debut at the age of 16 in January 2000.

The 2006 Portsmouth Player of the Year played 192 times in seven seasons for the south coast club, scoring 17 goals, before signing for Middlesbrough in a reported £5m deal in August 2007.

During his time at Fratton Park, O'Neil captained the side during their memorable escape from relegation from the Premier League in 2005/06. O'Neil continued to impress at the Riverside Stadium, scoring nine goals in 120 appearances over the past three-and-a-half seasons.

At international level, the married father-of-one was capped by England at every level up to U21, captaining England at the 2003 FIFA U20 World Youth Championship and making nine appearances for the U21s.

O'Neil will further bolster a Hammers midfield that contains Scott Parker, Mark Noble, Jonathan Spector, Luis Boa Morte and is soon to be boosted by the return of Germany international Thomas Hitzlsperger, who is now training fully with the club's reserve squad.