Iker Casillas insists 'all is under control' after he had a heart attack while training with Porto.

The 37-year-old goalkeeper, who won the World Cup with Spain in 2010, was taken to hospital on Wednesday where he is being treated.

On Wednesday evening he posted a picture of himself smiling in his hospital bed, alongside an update on his condition.

Scroll down for video

Iker Casillas insists 'all is under control' after he had a heart attack while training with Porto

The 37-year was taken to hospital on Wednesday and said: 'A big scare but everything is intact'

The former Real Madrid goalkeeper captained Spain to their first ever World Cup in 2010

Casillas won three Champions League titles with Real, along with seven domestic trophies

Porto confirmed the news on Twitter, with the message: 'Always together! Strength, Iker!'

WHAT HAPPENED TO IKER CASILLAS? The 37-year-old former Real Madrid and Spain goalkeeper suffered what is medically known as 'myocardial infarction' - more colloquially referred to as a heart attack. It occurs when blood flow slows or stops reaching a part of the heart, causing chest pains, shortness of breath and anxiety, among other symptoms. The usual root cause of myocardial infarction is a blood clot, which stops regular flow around the body. People who suffer heart attacks can return to work within weeks, but it usually takes months to recover. Casillas will not play again for Porto this season and may not be fit for the start of the 2019/20 campaign. Complications after an attack can include an irregular heartbeat or damage to the muscles. If Casillas has suffered long term effects, he may not play football again. Source: NHS Advertisement

'All under control here, a big scare but everything is intact. Thank you very much for the messages and affection,' he wrote on Twitter.

Casillas had been working at the PortoGaia Training Centre on Wednesday morning in preparation for their league encounter with Aves this weekend.

Casillas suffered an an 'acute myocardial infarction' - colloquially known as a heart attack - at Porto training, but was treated quickly and is not in immediate danger.

Casillas had been training with his team mates in temperatures of around 20 degrees celsius on Wednesday morning when he collapsed, causing the session to be suspended.

He remains in hospital and is not expected to feature again for Porto in the remainder of their Primeira Liga season.

Porto confirmed the worrying news on Twitter, with the message: 'Always together! Strength, Iker!', along with an image of Casillas with fans at his unveiling after signing for the club.

The club also posted an official statement on their website, which crashed due to the number of people wanting to read an update on the legendary goalkeeper's status.

The statement says: 'Iker Casillas suffered an acute myocardial infarction during Wednesday morning training session held at the PortoGaia Training Centre in Olival.

'The work session was promptly interrupted to provide assistance to the Porto goalkeeper, who is currently at the Hospital CUF Porto. Casillas is well, stable and his heart problem solved.'

Casillas with his wife Sara Carbonero at the 80th Anniversary of Marca in December 2018

Casillas was phenomenally successful during a 16-year spell as Real Madrid goalkeeper

He remains Porto No 1 and played both legs of the Champions League quarter final vs Liverpool

CASILLAS CV Age: 37 Position: Goalkeeper Clubs: Real Madrid (1999-2015), Porto (2015-present) Club career appearances: 881 International caps (Spain): 167 Total career appearances: 1,048 Major honours - Spain: 2010 World Cup; 2x European Championship (2008, 2012) Real Madrid: 3x Champions League (2000, 2002, 2014); 5x La Liga (2001, 2003, 2007, 2008, 2012); 2x Copa del Rey (2011, 2014); 2x Club World Cup (2014, 2015) Porto: 2018 Primeira Liga Advertisement

Casillas burst on to the scene when he made his debut for boyhood club Real Madrid as a teenager in 1999. He remained at the Bernabeu for the following 16 years.

During his club career he has won the Champions League three times - with Real in 2000, 2002 and 2014. He also won five La Liga titles and two Copa del Reys.

The Spanish giants released an official statement, which read: 'Real Madrid wants to send all out support to beloved captain Iker Casillas.

'Casillas has taught us throughout his professional career to overcome the most incredible challenges to enhance the glory of our club. He has taught us that giving up does not fit into our philosophy of life and has shown us countless times that being stronger the harder the challenge is, the way to achieve victory.

'Real Madrid want to see our eternal captain recover as soon as possible and send him all the courage of the world.'

Such is Casillas' standing in football, Real's great rivals, Barcelona and Atletico Madrid, also sent supportive messages to the goalkeeper.

Casillas (left) made his Real debut aged 17 in 1999 and by Euro 2000 he was in the Spain squad

Casillas was a player at Real for more than 25 years, having come through the club's academy

The goalkeeper was visibly emotional at a press conference marking the end of his Real career

His crowning achievement came in 2010 when he became the first Spanish captain to lift the World Cup, after they beat Holland 1-0 in the final in South Africa.

Playing every minute of Spain's seven games, Casillas conceded just twice, and kept clean sheets in all four of their knockout matches.

He was central to the dominant Spain side of the era, winning both Euro 2008 and Euro 2012. He is also his country's record appearance holder, with 167 caps.

Casillas moved to Porto in 2015 and helped them win the Portuguese league title last season. He remains their No 1 goalkeeper and played both legs of the Champions League quarter final defeat by Liverpool last month.

In total, Casillas has made more than 1,000 professional career appearances, and had no immediate retirement plans, with his contract at Porto set to run until 2020.

Well-wishes have been sent from around the world of football, including Thibaut Courtois

Pepe Reina, who was with Casillas in the 2010 squad, sent his support to his former team-mate

Casillas' former Real team-mate, Sergio Ramos, tweeted three praying emojis after the news

Gareth Bale, another former Real team-mate of Casillas, sent his best, as did many others

Former Barcelona striker Gary Lineker also tweeted his hopes Casillas will fully recover

Fabrice Muamba, who suffered a heart attack while playing for Bolton in 2012, sent his support

Stars from outside football also wished him the best, including tennis legend Rafael Nadal

Tributes and well-wishes have been sent from around the world of football, including by one of his successors as Real goalkeeper, Thibaut Courtois.

His former Real team mate, Sergio Ramos, tweeted three praying emojis, while fellow goalkeeper Loris Karius said he was 'shocked at the news'.

Pepe Reina, who was a team mate of Casillas in the Spain 2010 World Cup squad, tweeted a picture of the two goalkeepers embracing.

He wrote: 'With that heart so big I have no doubt that everything will be OK brother. Much courage!', along with a heart emoji.

Gareth Bale, another former Real team mate of Casillas, sent his best wishes, as did hundreds of other players - including Fabrice Muamba, who had a heart attack while playing for Bolton in a 2012 FA Cup match.

Stars from outside football also wished him the best - Spanish tennis legend Rafael Nadal tweeting: 'A huge hug to Casillas right now.'

Casillas is married to Spanish sports journalist Sara Carbonero. They have two children - Martin, five, and Lucas, two.

Such is Casillas' standing that Real's great rivals, Barcelona, also sent a supportive message

Real's city rivals, Atletico, also wished the legendary Spain goalkeeper a speedy recovery

Fellow goalkeeper Loris Karius, now at Besiktas, said he was 'shocked at the news'

Asmir Begovic of Bournemouth, joined the outpouring of tributes to Casillas on Wednesday

Many goalkeepers showed their concern with tweets, including Kasper Schmeichel