J Sainsbury plc (JSAIY) shares gained in early Tuesday trading after the supermarket reported better-than-expected first quarter sales.

Sainsbury's saw like-for-like retail sales excluding fuel increase 2.3% in the 16 weeks to July 1, due in large part to an outperformance in the general merchandise and clothing segments. This was better than the 1.9% that have been expected by analysts polled by Bloomberg, and ahead of the 0.3% sales rise in the fourth quarter, and the 1% rise in the third quarter of last year.

Sainsbury's shares were marked 0.32% higher in the first 30 minutes of trading to change hands at 249 pence each against a 0.4% decline for the benchmark FTSE 100. Sainsbury's shares have lost 1.9% loss over the past three months, compared to a 3.62% fall in the FTSE 350 Food & Drug Retailers Index over the same period as grocers face increasing competition.

The U.K.'s No. 2 supermarkets saw grocery sales up 3% and a 1.9% growth in transaction values, as grocers see stronger revenues due to rising inflation.

"We have delivered a strong performance, driven by our differentiated strategy, offering customers quality, value and choice across food, general merchandise, clothing and financial services," Group CEO Mike Coupe said in a statement.

Sales at the U.K. supermarkets grew at their fastest pace in five years over the past three months, according to Kantar Worldpanel data released last week, due in part to rising inflation, which hit the Office for National Statistics said hit 2.9% in May. While all supermarkets saw growth in the, according to Kantar Worldpanel data, it was low-cost competitors Aldi and Lidl that saw the greatest growth.

"The market is competitive and we continue to manage cost price pressures closely. Our strategy is delivering and we are well placed to navigate the external environment," Coupe said.

There is also growing competition in the global grocery market after Amazon.com Inc (AMZN) - Get Report announced it had bought Whole Foods Market (WFM) in a $13.7 billion deal, which is expected to put pressure on margins.

Sainsbury's said online sales of groceries grew by 8% in the quarter.