Speaking in the Rajya Sabha, he mentioned about the career of Ansari, whose tenure as the Chairman of the Upper House came to an end today.
"On behalf of the citizens and both Houses of Parliament, I express gratitude for the services you have rendered as Vice President of the nation," Modi said.
He hoped that Ansari would "continue to guide the nation in moving forward on the path laid down by the Constitution."
"You come from a family whose ancestors were associated at some of point of time with the Congress party and the 'khilafat movement'," he said.
More From This Section
The prime minister then talked about the diplomatic career of 80-year-old Ansari.
"A major part of your career was associated with West Asia as a diplomat. You spent many years of your life in that circle, in that atmosphere, in that ideology, in that debate and lived among such people," he said.
"But during these 10 years (as Vice President), you had to deal with a different kind of responsibility (in running the House). Every moment, you had to remain confined to the Constitution and you made a good effort to fulfill it.
"There may have been some struggle within you (all these years) but from now onwards, you won't have to face this dilemma. You will have a feeling of freedom and you will get an opportunity to work, think and talk according to your basic ideology," he told the outgoing Rajya Sabha Chairman.
Talking about the traits of a career diplomat, he said he understood these only after becoming the prime minister.
"You cannot understand immediately what is the meaning of their smile or what is the meaning of the way they shake hands. Because they have been trained like this. I am sure those traits would have been used (by Ansari) in the Rajya Sabha over the last 10 years for the benefit of the House."