Singer and actress Ariana Grande surprised the “Saturday Night Live” audience and crew with an unexpected profanity during her monologue on the program, a slip that in the past has sparked controversy at certain times during the late-night show’s long history.

Grande used her opening moments on the NBC program to poke fun at her past as a child star on Nickelodeon, then transitioned into a musical number in which she pondered what sort of scandal she might eventually encounter. She appeared to flub a line, and in reaction, uttered the phrase “Oh, s–t” while continuing with the song.

Grande’s mistake was unscripted, according to a person familiar with the program, and was expected to be cleaned up for the show’s broadcast on the West Coast.

The celebrity’s stint on the show was otherwise winning. She seemed to really grab the audience during a sketch in which she did impressions of singers ranging from Shakira to Britney Spears to Rhianna, and did a convincing imitation of Jennifer Lawrence during a run-through of “Family Feud  – Celebrity Edition.” She also performed two songs. An appearance by Larry David as Democratic candidate Bernie Sanders boosted the proceedings.

In the past, however, profanity on “Saturday Night Live” has not been rewarded. In February, 1981, cast member Charles Rocket improvised a response to host Charlene Tilton that included the word “f–k,” an incident that went down in infamy. Featured player Jenny Slate inadvertently used a variation of that same word in her debut on the program in September of 2009. While she had a strong first year, and even established herself with a recurring character, she did not return to the program in its next season.

Both of those mishaps took place well after midnight. Grande’s slip occurred during the first fifteen minutes of the broadcast, when the number of viewers watching from home is typically at its apex.

At least one person who swore on a live “SNL” telecast escaped punishment. In 1995, cast member Cheri Oteri uttered the word “s–t” while playing irascible character Rita DelVecchio. Host David Schwimmer called attention to the mistake during the episode’s farewell moments, and Oteri placed some money in a “swear jar.” All was forgiven. Oteri stayed with the program until 2000.