London - Championship side Burnley ended Joey Barton's search for a new club as they signed the former Manchester City and Newcastle midfielder on Thursday.
Barton was a free agent following his release from QPR at the end of last season and still hadn't found a new team when the season began nearly three weeks ago.
The controversial 32-year-old was in talks with West Ham, but the Premier League club pulled out of the deal after fans protested at the prospect of his signing.
But Barton, who won one cap for England, has finally sorted out his immediate future after agreeing to join Burnley, who were relegated from the English top-flight last season.
"I'm delighted that we have Joey on board," Burnley boss Sean Dyche said.
"I know there is other stuff to his life and character, but on the pitch I think everyone speaks well of him and he is certainly someone who I think can get the culture and the understanding of what we do here."
Barton has provided a slew of controversial moments throughout his career - from assaulting then-Manchester City team-mate Ousmane Dabo in 2007 to clashing with two City players on the field five years later, earning a 12-match suspension from the Football Association.
He was also once struck by a bottle that had been thrown from the crowd at Burnley when playing for QPR.
However, Barton, who had a loan spell at French club Marseille in the 2012-13 season, revealed how a chat with Dyche convinced him to move to Burnley.
"We spoke at length about football over lunch yesterday," Barton told Burnley's website.
"I knew as soon as I left his house that I wanted to play for Burnley. He's the most impressive guy I've sat in front of for a long, long time."