Spanish goalkeeping great Iker Casillas left hospital in Portugal on Monday and said that his football future is uncertain, five days after suffering a heart attack during training with his club.

The 37-year-old, who has played for Porto since 2015, was admitted to hospital last Wednesday after suffering what the Portuguese club called an “acute myocardial infarction” in training. “I feel much better,” he told reporters outside the hospital in Porto.

“It will be rest for a couple of weeks, or even a couple of months. The truth is that I don’t care. The important thing is to be here... I don’t know what the future may bring.”

Casillas has 167 Spain caps, winning the 2010 World Cup and two European Championships, and also played over 700 games for Real Madrid. “The truth is, it’s something that can happen to anyone and at any moment,” he added. “It’s hard to talk about, but you also have to be very grateful because I’ve been very lucky.”

He had assured fans that he was recovering well on Wednesday, saying on social media that “everything was under control”.

Portuguese media reported Casillas had undergone surgery and that his season was over. Porto are second in the Portuguese league, just two points behind leaders Benfica with two games to play, and face Sporting Lisbon in the Portuguese Cup final on May 25.

Casillas turns 38 later in May and recently extended his contract with Porto to next year with the option of an additional 12 months. He said Porto had told him they wanted to keep him until he turned 40.