Emilia Clarke has opened up about suffering a life-threatening stroke not long after completing filming on the first season of Game of Thrones, as she launches a charity to support young people with brain injuries.

Clarke, who plays Daenerys Targaryen on the hit fantasy drama, penned a piece for The New Yorker in which she revealed that she battled two brain aneurysms while speaking about her decision to launch the SameYou charity, which she said she has been working on for "a fair few years."

In February 2011, shortly after filming the first season of Game of Thrones, Clarke began to work with a personal trainer and during one session she was overcome by immense pain.

Emilia Clarke on Game of Thrones

"I tried to ignore the pain and push through it, but I just couldn’t," Clarke wrote. "I told my trainer I had to take a break. Somehow, almost crawling, I made it to the locker room. I reached the toilet, sank to my knees, and proceeded to be violently, voluminously ill.

"Meanwhile, the pain—shooting, stabbing, constricting pain—was getting worse. At some level, I knew what was happening: my brain was damaged."

Clarke then went to the hospital where she underwent scans and tests, which showed that she had "a subarachnoid hemorrhage (SAH), a life-threatening type of stroke, caused by bleeding into the space surrounding the brain. I’d had an aneurysm, an arterial rupture. As I later learned, about a third of SAH patients die immediately or soon thereafter."

After a surgery, Clarke spent some time in the intensive care unit and she revealed that she could not remember her own name.

"One month after being admitted, I left the hospital, longing for a bath and fresh air," she said. "I had press interviews to do and, in a matter of weeks, I was scheduled to be back on the set of Game of Thrones.

Clarke returned to work, but had been told that there was a smaller aneurysm on the other side of her brain.

"The doctors said, though, that it was small and it was possible it would remain dormant and harmless indefinitely. We would just keep a careful watch. And recovery was hardly instant," she continued.

"There was still the pain to deal with, and morphine to keep it at bay. I told my bosses at Thrones about my condition, but I didn’t want it to be a subject of public discussion and dissection. The show must go on!"

In 2013 her aneurysm had doubled in size so she underwent two more surgeries.

"I spent a month in the hospital again and, at certain points, I lost all hope. I couldn’t look anyone in the eye. There was terrible anxiety, panic attacks," Clarke said.

"I felt like a shell of myself. So much so that I now have a hard time remembering those dark days in much detail. My mind has blocked them out. But I do remember being convinced that I wasn’t going to live. And, what’s more, I was sure that the news of my illness would get out. And it did—for a fleeting moment. Six weeks after the surgery, the National Enquirer ran a short story. A reporter asked me about it and I denied it.

"But now, after keeping quiet all these years, I’m telling you the truth in full. Please believe me: I know that I am hardly unique, hardly alone. Countless people have suffered far worse, and with nothing like the care I was so lucky to receive."

Read Clarke's full New Yorker feature here.