NEW DELHI — Almost two years ago, Prime Minister Narendra Modi of India threw the country into turmoil when he decided, by surprise and practically overnight, to effectively invalidate the old paper currency.

Mr. Modi’s plan, kept secret even from his cabinet until it was announced, gave citizens a 50-day deadline to turn in their 500-rupee and 1,000-rupee notes to banks in exchange for new notes. After the deadline, the old notes would be totally useless.

As Indians waited in interminable lines at banks, and everyone from rickshaw drivers to real estate agents suffered a hit to their businesses and lives, Mr. Modi’s team said the pain was necessary to punish those who were hoarding ill-gotten cash.

These hoarders — including criminals, terrorists and tax evaders — would be too afraid to exchange their old bills for new ones, the thinking went, because going to banks would expose them to scrutiny and possible prosecution.