Tech giant Samsung reported a record quarterly profit on Friday, owing to rising global demand for memory chips.

“Samsung has hit the jackpot with the memory chip supercycle, and its every other business including display panels and smartphones is doing pretty well,” CW Chung, head of research at Nomura told the Financial Times.

The South Korean company had an operating profit of $12bn in the three months to June, up 72 percent on the year before.

Apple is not due to report its results for the same period until next month but analysts expect operating profits of $10.5bn.

“Samsung is set to post the biggest operating profit for the second quarter and for the whole year, surpassing Apple and any other major tech company, as its earnings will be even better in the third quarter,” said Kim Young-woo, analyst at SK Securities.

Samsung’s sales increased by 18 percent, with smartphones including the new flagship Galaxy S8 proving particularly popular among consumers.

Despite the mass recall of the faulty Galaxy Note 7 handsets, which were prone to catching on fire, Samsung has still been able to make a profit.

Samsung will launch the Galaxy Note 8 later this year in South Korea using parts from the axed Note 7 to “minimise the environmental impact” of the recall.

Samsung shares have gained 30 percent in the year to date.