The former Brazil and Barcelona midfielder Ronaldinho, twice the World Player of the Year, has signed a two-year deal with Queretaro, the Mexican first division club said on Friday.

The 34-year-old, who has also played for Paris Saint-Germain and Milan, became a free agent in July after cancelling his contract with the Brazilian club Atlético Mineiro. Basingstoke Town of the Conference South made ambitious overtures towards the player last week but Ronaldinho has opted for the Mexican first division, not the sixth tier of English football.

“We are very pleased to add to our ranks as of today, a player who has excelled in international football. A world champion in 2002, World Player of the Year in 2004 and 2005,” the club said in a statement.

“We hope the fans of our city and around the country join in this celebration of having Ronaldinho as a Gallos who will contribute his experience and expertise to further strengthen this great team.”

Queretaro, coached by the former Mexico defender Ignacio Ambriz, are eighth in Liga MX after seven matches in the championship.

Ronaldinho, who was linked with numerous clubs around the world, said he would wear the No49 shirt in Mexico as it was his lucky number. “I’ve always been received with affection in Mexico – I am very motivated to represent Queretaro,” he posted on his Twitter account.