"New beats to the #IndiaAfrica rhythm! PM @narendramodi and President @MagufuliJP play the drum," External Affairs Ministry Spokesperson Vikas Swarup tweeted.
Both the leaders played the wooden drums after the Prime Minister was accorded a ceremonial welcome at the State House here.
65-year-old Modi was seen enjoying the drumming session with the Tanzanian President, who appeared to halt briefly but resumed the drumming again when he saw the Indian leader was in no mood to stop.
He gave tough competition to the professional drummers as he tried his hand on the drum at an event to launch TCS Japan Technology and Cultural Academy in Tokyo.