BENGALURU - Indian shares ticked higher on Thursday as upbeat earnings from Infosys Ltd lifted IT stocks even though coronavirus cases in the world's second-most populous nation neared 1 million.

The NSE Nifty 50 index rose 0.52% to 10,673.7 by 0450 GMT, while the S&P BSE Sensex gained 0.77% to 36,329.7.

Shares of Infosys surged nearly 15% to a record high after the software services provider reported a better-than-expected first-quarter profit on Wednesday evening and reinstated its full-year revenue growth guidance. 

Tata Consultancy Services, India's second-most valuable stock, rose 3.15%, pushing the Nifty IT index up nearly 5.4%.

"In such an uncertain environment, IT is one sector where there is some sense of visibility in top lines and bottom lines for investors," said Deepak Jasani, head of retail research at HDFC Securities in Mumbai.

"However, this tech upside may be over and markets would expect something else going forward."

Auto stocks also contributed to the gains, with the Nifty auto index rising 0.5%. Carmaker Maruti Suzuki climbed 1.4%.

Coronavirus cases touched 968,876 as of Thursday morning, federal government data showed, forcing many states and cities to impose fresh lockdowns to control its spread.

The pandemic has depressed domestic demand, with India reporting a trade surplus for the first time in more than 18 years for June, as imports of crude oil, gold and other industrial products plunged, reflecting a slowing economy.

"Markets need an improvement in macro- or micro-economic conditions to move upward, and that is not likely to happen soon," Jasani said.

Among losers, the Nifty fast-moving consumer goods index fell 1.1%, with cigarettes-to-hotels conglomerate ITC Ltd shedding 2.7%.

Bharti Infratel and Indian Oil were the day's top laggards, falling 4% and 3.2%, respectively.

(Reporting by Derek Francis in Bengaluru; Editing by Subhranshu Sahu) ((derek.francis@thomsonreuters.com; +91-9986311363 and @derekfrancis089 on Twitter;))