Without naming Pakistan, Prime Minister Narendra Modi on Monday said that all those who shelter terrorists should be condemned while asserting that India wanted a lasting partnership with Africa.
"We live in a world where preachers of hate and violence are threatening the fabric of our society, " Modi said while addressing the students of the University of Nairobi here.
"As young dynamic citizens of Kenya and as members of the African society, you would need to be watchful of those who spread radical ideologies, " he said.
"And be equally condemning of those who who give shelter to terrorists and use them as political instruments. "
Modi said the youth can also play an important role in building a counter - narrative to extremists ideologies. .
His comments come in the wake of the recent terror attacks in Bangladesh, including one at a cafe in Dhaka that claimed over 20 lives.
Kenya too is a frequent target of terrorists, especially from Al Shabab militants from across the border in Somalia.
In 2013, an attack on the Westgate Mall in Nairobi left at least 67 people dead, including Indians.
The Prime Minister said that India wanted a lasting partnership with Africa.
"Let us also not forget that together, India and Africa represent a third of humanity, " he said.
"We want to forge a lasting partnership that does not rely on old models and rules of engagement, one which focuses on and empowers people, one where we share the fruits of each other's prosperity, one which seizes the opportunities of the 21st century and also responds to its challenges to bring safety and security to our societies. "
Modi said that among the rising African economies, Kenya has been one of the strongest performers.
"With significant presence of Indian companies in Kenya, our investment partnership is robust, diverse and vibrant, " he said.
The Prime Minister promised India's unwavering commitment and partnership.
"You will find in India a trusted and reliable partner, " he said.
"A partner who would rejoice in your success, who would always be there with a helping hand, and who would be on your side in your hour of need. "
Stating that this was the age of inter - dependence, he told the students in this world of growing opportunities and complex challenges.
"you would inherit its tomorrow".
"And shape the future of this great country.
A safe and prosperous Kenya and strong Africa is your destiny, " he said.
Prior to his speech, the Prime Minister offered floral tributes at a statue of Mahatma Gandhi in the university.
India and Kenya signed seven agreements on Monday following delegation - level talks headed by Modi and Kenyan President Uhuru Kenyatta.
Modi arrived in Kenya on Saturday on the final leg of his four - nation African tour.
He will leave for New Delhi later on Monday.