Sometimes athletes have to walk away from the sport they love.

Sergio Martinez announced his retirement at the International Boxing Hall Of Fame Banquet over the weekend, according to Fight News. During his retirement speech, he thanked his fans for support over the last 20 years. He also thanked his parents for their support.

Martinez, who also went as Maravilla, also took to Twitter on June 13 to announce his retirement.

"Thanks to all, I am retired," he said in English before switching to Spanish. "Thanks for everything. Here ends a chapter of my life. I am officially retired."

The boxer also showed what his first day of retirement looked like on Twitter.

Starting his amateur career at the age of 20, Martinez turned pro at 22 and started out strong. He started his career at 16-0-1 before suffering his first loss against future champ Antonio Margarito. After that match, he went 29 straight fights without a loss, according to the New York Times.

Martinez beat then-WBC super weight champ Paul Williams twice, including a one-knockout punch to him in the rematch. Frequent knee problems and a fight with then up-and-coming fighter Miguel Cotto derailed his career. Now, he is hanging his gloves up.

The 40-year-old Martinez didn't say why he retired, but it's very likeley it is due to the problems with his right knee, which Martinez has had two surgeries on. The knee is reportedly still giving Martinez problems.

Martinez had memorable fights in his career.

He faced fighters Julio Cesar Chavez Jr., Kelly Pavlik, Matthew Macklin and Serhiy Dzinziruk. In 2009, he was robbed of a victory in his fight against Kermit Cintron after the referee ruled that Cintron was not knocked out instead it was a head-clashed.

Martinez finished his career with a record of 51-3-2, with 28 Knockouts.