Image copyright Reuters Image caption Emilia Clarke was 24 when she had her first aneurysm

A Game of Thrones star has revealed she had to undergo brain surgery between two seasons of the hit series.

Writing in The New Yorker, Emilia Clarke said she suffered two "life-threatening" aneurysms.

The actor, who plays Daenerys Targaryen, underwent surgery twice, leading to "terrible anxiety" and panic attacks.

Despite thinking she would die, Clarke has now recovered beyond her "most unreasonable hopes".

The actress, who is from Oxford, plays a young princess sold into marriage who she describes as "a figure of power and self-possession".

Clarke experienced her first aneurysm in 2011. She had been working out before collapsing in a toilet with "shooting, stabbing, constricting pain".

Image copyright HBO Image caption Clarke's character, Daenerys, is described as "a blend of Napoleon, Joan of Arc and Lawrence of Arabia"

Doctors diagnosed her with having a subarachnoid haemorrhage (SAH), from which a third of sufferers die immediately or soon after.

After the surgery, a condition called aphasia set in, meaning she could not communicate and feared her acting career was over.

"In my worst moments, I wanted to pull the plug," she said. "I asked the medical staff to let me die."

She recovered enough to return to filming Season 2 of Game of Thrones but said: "I was often so woozy, so weak, that I thought I was going to die."

In 2013, while performing for a play in New York, she received brain surgery for a second aneurysm on the other side of her brain.

This surgery was far more intrusive, meaning her skull had to be opened up.

"I looked as though I had been through a war more gruesome than any Daenerys experienced," said Clarke.

Her piece in The New Yorker is the first time she has spoken about her experience.

She says she is now "at a hundred per cent" and has helped develop a charity that supports people recovering from brain injuries and strokes.