Microsoft Chief Executive Officer Satya Nadella has criticised a new citizenship law passed by India's Hindu nationalist government last month that critics say goes against the spirit of the country's secular constitution.

The legislation, which makes faith as the basis of citizenship, has triggered nationwide protests against the government of Prime Minister Narendra Modi.

More:

"I think what is happening is sad, primarily as sort of someone who grew up there ... I think it's just bad," Nadella told BuzzFeed at an event in New York.

"And even a story like mine being possible in a country like this - I think, if anything, I would love to see a Bangladeshi immigrant who comes to India and creates the next unicorn in India or becomes the CEO of Infosys. That should be the aspiration. If I had to sort of mirror what happened to me in the US, I hope that’s what happens in India."

I am glad Satya Nadella has said what he has. I wish that one of our own IT czars had the courage and wisdom to say this first. Or to say it even now. https://t.co/KsKbDUtMQk — Ramachandra Guha (@Ram_Guha) January 13, 2020

Nadella grew up in Hyderabad, a technology hub in India that is home to the biggest Microsoft research and development centre outside of the United States.

"I'm very proud of where I get my heritage, culturally in that place, and I grew up in a city, Hyderabad. I always felt it was a great place to grow up. We celebrated Eid, we celebrated Christmas, Diwali - all three festivals that are big for us," he said.

Deadly protests

India's Citizenship Amendment Act (CAA) eases the path for non-Muslims from the neighbouring Muslim-majority nations of Pakistan, Afghanistan and Bangladesh to gain citizenship, but excludes Muslims.

If combined with a proposed nationwide counting of citizenship (National Register of Citizens or NRC), critics of the CAA fear it will discriminate against India's Muslim minority and chip away at its secular constitution.

The tech giant later posted a statement by Nadella on Twitter saying he was shaped by "growing up in a multicultural India" and his "immigrant experience in the United States".

"My hope is for an India where an immigrant can aspire to found a prosperous start-up or lead a multinational corporation benefitting Indian society and the economy at large."

Nadella's comments come amid nationwide protests against the CAA which critics fear is part of Modi's Hindu supremacist agenda. More than 20 people have been killed in police crackdown but protests have continued.

The government says the law is meant to help persecuted minorities from neighbouring countries but it has failed to convince why Tamils and Rohingya refugees from Sri Lanka and Myanmar respectively are not eligible under the new law.