(CNN) -- A tiny message hidden in Edvard Munch's famous painting "The Scream" was written by the artist himself, a new investigation of the work has found, finally resolving one of modern art's most enduring mysteries. The message "Can only have been painted by a madman," scrawled and barely visible in the top left-hand corner of the painting, has been the subject of debate for decades and was widely believed to have been an act of vandalism by a viewer of the piece. But extensive research by the National Museum of Norway has revealed that Munch wrote the phrase himself.