Modi, who had come to the Facebook headquarters for a townhall meeting, scrawled the message in Gujarati -- "Ahimsa paramo dharma, Satyameva jayatey" -- non-violence is the greatest religion, truth will remain victorious.
"PM @narendramodi's special message, in Gujarati. 'Ahimsa is the greatest Dharma. Satyameva Jayate'," tweeted external affairs ministry spokesperson Vikas Swarup, with a photo of the writing.
Modi attended the Townhall along with Facebook chief Mark Zuckerberg.