The exclamation was the signature nickname of the flamenco dancer and singer, La Caramba, in the 1780s in Madrid. Her head-dress of brightly coloured ribbons became known as a caramba too.
The phrase is regularly used by stereotyped Mexicans in (especially Wild West) fiction, for example the adventures of Zagor, Tex Willer or Lucky Luke and select Warner Brothers cartoons, such as the bull Daffy Duck encounters in the 1947 cartoon Mexican Joyride.
Ay Caramba! was the name of a 1998–2006 Spanish-language television series featuring funny home videos. It was broadcast on Mexico's TV Azteca network.
The fictional character Bart Simpson from the American animated sitcom The Simpsons further popularized the phrase in modern pop culture. It became one of his most notable catchphrases. Bart said the line not always in positive surprise, but in negative/general surprise as well.