Liev Schreiber detailed a terrifying experience ​he went through during his current Broadway run in Doubt: A Parable, where he suffered temporary amnesia and couldn’t remember his lines.

“The worst nightmare that an actor could possibly ever experience,” Liev, 56, said while recounting the story during a Monday, April 15, appearance on Late Night With Seth Meyers.

“I was in my dressing room and I had a terrible headache. I thought it was maybe a fast food headache, but it felt a little stronger than that. I’m walking down the stairs and I’m thinking, ‘This is not normal. I don’t feel ​OK,'” he continued. Liev added that when he saw costar Amy Ryan backstage, he couldn’t remember her name, “So, something was really wrong.”

“I get over to stage left where I make my entrance from, and I see the play in the corner and there’s a light on it and I don’t recognize it at all,” the actor added about the scary ordeal.

Liev Schreiber Recalls Getting Amnesia on Broadway Stage
Michael Loccisano/Getty Images

Liev explained he went on stage and was able to do the “first six or seven” lines of the play “automatically,” but then stopped to try to get himself “reconnected.” The minute he did that, “It all vanishes. The play is gone from my head. I’m looking out into a dark audience. I know I’m in a play, but I don’t know what play I’m in,” the Ray Donovan alum continued.

“I look down at my clothes and I realize I’m a priest, which is helpful but not giving me any lines,” Liev joked. After he left the stage and was rushed back to his dressing room, the Salt star shared, “The next thing I remember is hearing my understudy doing the lines from the play and thinking ‘It sounds really good. I wish I knew what it was.'”

He continued. “My doctor, who’s a friend, shows up and he had a terrified expression. My wife shows up, she looks terrified. I think, ‘OK, I’ve had a stroke. This is it.’”

Liev got an MRI which showed no brain bleed and everything looked “perfectly fine.” He later found out from a neurologist that he had a condition called transient global amnesia.

The San Francisco, California, native’s wife, Taylor Neisen, looked up what caused the condition, as he joked, “Apparently it’s brought on by migraines and rigorous coitus,” referring to having rough sex.

Fortunately for Liev, his neurologist assured him he would never have the condition again and that it would be gone “in eight to 24 hours,” which proved to be correct.

“I go to sleep, I wake up, I remember the whole play,” he shared. “I never had another problem with it. I was embarrassed and thought everyone would think I was lying and taking a night off from the theater.”

Liev said he called a friend and told him he had transient global amnesia, to which his pal responded, “Oh yeah, my friend Nathan had that. He was having sex with his wife in the shower and lost two days.”

That disappointed the Spotlight star. “So apparently it really is a thing. When the other option is to literally have your brains f–ked​ out, I had to get it from a migraine,” he said with a laugh.