Gillian Anderson has officially confirmed she will be leaving The X-Files following its current season.

The actress reprised her role as FBI agent Dana Scully, which she originally played from 1993 to 2002, for a short revival series in 2016, but it proved so popular that she and co-star David Duchovny signed up for an eleventh series, which premiered last week.

Gillian had admitted she was thinking about leaving after the show, and during a Television Critics Association (TCA) panel discussion on Wednesday, she declared she was done and ruled out any potential return in the future.

“It’s time for me to hang up Scully’s hat. It just is,” she said, according to The Hollywood Reporter. “I’m finished, and that’s the end of that.”

She explained that she wasn’t intending to do two series, but after only six episodes in the tenth season, she felt she couldn’t part with Scully there.

“I felt that the previous six was going to be it. It was dipping our toe back in again... and getting to play these wonderful characters again,” she added. “I think as (series creator) Chris (Carter) has said himself, that short stack of episodes felt like we were learning how to walk again and that this season of 10 feels like the pace is up and we’re running.

“I wouldn’t necessarily have been happy if those six were how we said goodbye... There’s lots of things that I want to do in my life and in my career and it’s been an extraordinary opportunity and extraordinary character and I am hugely grateful.”

David said he would be “good either way” if the show continued without his co-star or ended after the current run, noting that the show carried on without him in season nine, when he only appeared in two episodes out of 20.

During the discussion, Gillian also repeated the news that she is leaving TV show American Gods after one season. Showrunners Bryan Fuller and Michael Green reportedly quit the series after a dispute over budget.