England goalkeeper David James has signed a one-year deal with Championship side Bristol City.
James, who turns 40 this weekend, was available on a free transfer after leaving Portsmouth.
A statement on the club's official website read: "Bristol City FC have agreed a deal to sign England international goalkeeper David James. The 39-year-old passed a medical at Ashton Gate today (Friday) and has agreed a one-year deal, with an option of a further year."
James helped Portsmouth to the FA Cup final last season before representing England at this summer's World Cup. He had been linked with Celtic, Fulham and Sunderland but the Bristol Evening Post reports that James did not want to leave his home in Exeter.
"I've had offers to stay in the Premier League but it is more important that I play football - which I love - for the right club and be a family man," James said. "I had a long conversation with the chairman Steve Lansdown and I liked what he said about the club and his ambition.
"I know all about the plans for a new stadium and desire to win promotion to the Premier League. The club is ambitious and that's what I am. The South West has not had a club in the Premier League and that needs to change."
Lansdown said: "I'm delighted David James has agreed to sign. My ambition is for this football club to play at the highest level - the Premier League - and in the best surroundings, hence the work on the training ground and new stadium. We need good quality players to make that happen and that's why I'm thrilled that David has agreed to come on board."
The Robins finished tenth in the Championship last season.