Lionel Messi ended his final match of the calendar year with a groin injury that forced him to be substituted in Argentina's 1-0 win over Brazil on Tuesday at the Maracana in Rio de Janeiro.

The Argentina captain, who was replaced in the 78th minute, said he felt pain in his groin after the match, which was marred by clashes between fans and police.

- Stream on ESPN+: LaLiga, Bundesliga, more (U.S.)

"I felt discomfort in my adductor," Messi said. "It was my last game of the year, so I have time to get well to start 2024 giving everything."

The Inter Miami forward received treatment on the touchline in the first half and looked short of fitness.

Lionel Messi went off the pitch for treatment on multiple occasions during Argentina's win. Photo by Wagner Meier/Getty Images

Messi said the 27-minute delay to the start of the game caused by the violent clashes contributed to his injury.

"It didn't help me to cool down and go inside the locker room and then come back," he said.

Messi, 36, played all 90 minutes of Argentina's 2-0 victory over Peru on Thursday, his first competitive game since Oct. 21, when he started in Inter Miami's 1-0 MLS defeat to Charlotte FC.

The former Barcelona star has struggled with injuries throughout this season.

Messi, who joined Inter Miami in the summer after two seasons at Paris Saint-Germain, missed five MLS games with a hamstring injury before returning to action on Oct. 7.

Despite not making his usual impact on the pitch, Messi was delighted that his team handed Brazil their first home loss in World Cup qualifying on Tuesday.

"This group continues to achieve historic things," the eight-time Ballon d'Or winner said. "It's a nice thing to win in Brazil knowing how historically strong they are at home."

Messi has plenty of time to recover from his injury as he will not return to preseason training with Inter Miami until the second week of January.

Inter Miami on Tuesday denied that they have arranged a preseason fixture against Al Nassr, the club of Messi's long-term rival Cristiano Ronaldo.