In a series of tweets, Pichai said that although Google gives 'law enforcement access to data based on valid legal orders', but it is 'wholly different than requiring companies to enable hacking of customer devices and data', which could set a 'troubling precendent'.

"Forcing companies to enable hacking could compromise user's privacy," the Indian-American CEO said as he supported Apple CEO Tim Cook's stand.

"We know that law enforcement and intelligence agencies face significant challenges in protecting the public against crime and terrorism," Pichai said, adding "we build secure products to keep your information safe and we give law enforcement access to data based on valid legal orders".

Also read: Apple withdraws iPhone 4s, 5c from Indian markets

Apple, which is eyeing big on the Indian market, yesterday opposed a US court's ruling to unlock the I-Phone of of San Bernardino gunman Syed Farook who shot dead 14 people and injured 22 others last December.

In an open letter to its customers, Cook said building a backdoor access to encrypted data on the iPhone of the gunman would be 'too dangerous' to create. Cook's response came after a federal judge ordered Apple to provide investigators access to Farook's iPhone after the company 'declined to provide' it voluntarily.

>> Click here for more news on Sundar Pichai