LISBON, Portugal — Portuguese club Benfica and former Brazil goalkeeper Julio Cesar have ended his contract by mutual consent.

The club released a video Tuesday with the 38-year-old goalkeeper bidding an emotional farewell to the rest of the squad.

Julio Cesar said his “journey ends here,” but did not say whether he will stop playing altogether.

He played for three and a half years with the Portuguese champion, but hadn’t been starting recently.

His contract would have expired at the end of the season.

Julio Cesar was with Brazil when it won the 2004 Copa America and the 2009 and 2013 Confederations Cup.

He was a member of Brazil’s World Cup squad in 2006, and started for the national team at the World Cups in 2010 and 2014.

His mistake in one of the goals conceded against the Netherlands played a part in Brazil’s elimination in the quarterfinals of the 2010 tournament. He was in goal for the team’s 7-1 defeat to Germany in the semifinals of Brazil’s home World Cup four years later.