Actress Valerie Harper was taken to the hospital Wednesday just before her evening performance in “Nice Work If You Can Get It” at the Ogunquit Playhouse. The star, who has been playing the role of Millicent Winter alongside Sally Struthers, remained hospitalized Thursday morning but was “resting comfortably,” according to a news release emailed by Cheryl Farley, the theater’s marketing director.

Harper “will remain in the hospital for observation for the time being,” the release said. She was initially taken to York Hospital, but it was unclear where she was hospitalized as of Thursday afternoon.

The star, who played Rhoda Morgenstern in “The Mary Tyler Moore Show,” was diagnosed with lung and brain cancer in recent years. A Portland Press Herald reporter was tentatively scheduled to interview Harper between the matinée and evening shows Wednesday but was told she did not feel up to the interview and was resting.

Harper was preparing to perform Wednesday night when Ogunquit Fire and Rescue responded to an 8:56 p.m. call to the playhouse for an unconscious 75-year-old woman, Chief Mark O’Brien said. When rescue workers arrived, the woman was conscious, he said. An understudy performed in Harper’s place Wednesday night and was expected to do so again in the Thursday matinee, according to Farley.

Harper is no longer listed as a patient at York Hospital. Farley declined to comment further, including on where Harper is being cared for or whether she was expected to return to the show, which is scheduled to run through Aug. 15. Harper’s character appears in Act II.

“The audiences and all of us here at the Playhouse are greatly enjoying our time with Valerie here in Ogunquit, and we are encouraged that she is feeling better,” Executive Artistic Director Bradford T. Kenney said in the release.