By Kosaku Narioka

HCL Technologies Ltd.'s first-quarter net profit rose 21% from a year earlier thanks to higher earnings from several segments, including information-technology services.

Net profit for the quarter ended June 30 rose to $386.3 million from $319.7 million a year earlier, the company said Friday. That beat the estimate of 26.45 billion rupees ($351.8 million) from a Visible Alpha poll of analysts.

First-quarter revenue declined 0.3% to $2.36 billion, weighed by the Covid-19 pandemic.

While revenue fell 7.1% for IT services to $1.65 billion, the segment's earnings rose 5.0% to $310.2 million.

HCL Chief Financial Officer Prateek Aggarwal said the company showed margin resilience and cash-generation prowess in the quarter despite the pandemic's impact on revenue.

Write to Kosaku Narioka at kosaku.narioka@wsj.com