As much as “Star Trek Into Darkness” fans might have enjoyed seeing actress Alice Eve in her underwear, the blockbuster movie’s writer has admitted that her scene was “gratuitous.”

On Monday night, “Star Trek Into Darkness” writer Damon Lindelof took to Twitter to apologize for a scene in which Eve, who plays Dr. Carol Marcus, strips down to a set of revealing underwear before changing into her space suit. Online commentators pointed out that the stripping scene, while alluring, did little to advance the film’s plot, Yahoo Movies reports.

“I copped to the fact that we should have done a better job of not being gratuitous in our representation of a barely-clothed actress,” Lindelof wrote in the Twitter post. Many had hoped that Dr. Marcus’ scenes with Captain Kirk would delve into the characters’ storied relationship within “Star Trek” canon, Yahoo Movies reports.

In addition, Lindelof reiterated that, while the underwear scene was gratuitous, it was not intended to be degrading to women. "We also had Kirk shirtless in underpants in both movies. Do not want to make light of something that some construe as mysogenistic [sic],” Lindelof tweeted.

Yahoo Movies notes that Marcus’ scenes could have served a far greater purpose than merely displaying Eve in her underwear. Specifically, “Stark Trek Into Darkness” could have further explored her well-known chemistry with Kirk. According to “Star Trek” lore, Marcus and Kirk eventually have a child together.

Lindelof plans to apply the lessons from his provocative portrayal of Eve’s character to his future work. "What I'm saying is I hear you, I take responsibility and will be more mindful in the future,” he wrote. He poked fun at the typo in his earlier tweet, writing "Also, I need to learn how to spell 'misogynistic.'"

Before cowriting and producing “Star Trek Into Darkness,” Lindelof was best known for his role as a cocreator of the popular “Lost” television series. He also cowrote the screenplays for “Cowboys & Aliens” and “Prometheus.”