Former Brazil and Lyon midfielder Juninho has announced his retirement from soccer after a 20-year career.

The 39-year-old Juninho had been practicing with Brazilian club Vasco da Gama in an attempt to keep playing, but the midfielder said he was struggling too much to recover from a muscle injury sustained late last year.

Juninho says ''it was privilege to play'' as long as he did, ''although it was harder than I thought.''

The midfielder will be a TV commentator during the World Cup and says he is already ''considering a coaching career.''

Juninho played in the 2006 World Cup with Brazil. He thrived with Lyon in the 2000s, and was with the New York Red Bulls before returning to Vasco last season.