Stockhausen mentioned his wish to write something for the Kontarsky brothers to Heinrich Strobel, director of the Music Division of the SWF Baden-Baden and Artistic Director of the Donaueschinger Musiktage für Zeitgenossische Tonkunst and, toward the end of 1969, Strobel commissioned a work for two pianos for the 1970 Donaueschingen Festival. After abandoning "Vision", Stockhausen took up the melody he had jotted down the previous September and on its basis made a form plan and laid out the new work's skeleton between 1 May and 20 June 1970 in Osaka, Japan. He then completed the score in an unbroken stretch of work at his home in Kürten from 10 July to 18 August 1970. Alfons and Aloys Kontarsky gave the premiere of "Mantra" in Domaueschingen on 18 October 1970, and made the first recording of the work from 10 to 13 June 1971 at the Tonstudio Kreillerstraße 22 in Munich, for Deutsche Grammophon. The score first appeared in print only in 1975, as one of the first publications of the composer's newly founded Stockhausen-Verlag.