(Bloomberg) -- Samsung Electronics Co.’s profit for the second quarter beat analyst estimates thanks to rising memory prices and the recovery of its Austin chip foundry.

South Korea’s largest company posted net income of 9.45 trillion won ($8.2 billion) for the three months ended June, beating an 8.7 trillion won average of estimates compiled by Bloomberg. Samsung disclosed preliminary numbers earlier this month that showed operating profit rose more than 50%. The results included a one-time gain in its display business.

Data center operators and PC makers have pushed memory prices up as they rush to secure inventories in the wake of a chip shortage and growing demand for services and hardware at home. Despite a slump in phone shipments partly due to supply chain disruptions in Vietnam, Samsung maintained profitability with more frugal digital marketing and robust sales of its tablets and wearable gadgets.

“Although smartphone demand contracted globally due to chip shortages and the spread of Covid-19 in India, memory shipments and prices rapidly increased from server clients that helped improve earnings,” said Greg Roh, a senior vice president at HMC Securities. “A one-time gain from a North America-based client in display and a price increase in mobile OLED products were also positive factors.”

Operating profit in the semiconductor business rose 28% from a year earlier to 6.93 trillion won. Samsung said its memory chip shipments exceeded bit growth guidance at the same time average selling prices rose.

For the second half, Samsung said it anticipates demand will remain solid for mobile and server chips, while it should be able to improve cost competitiveness with new technologies.

“Samsung expects demand to recover for mobile displays as major customers are planning to launch new flagship models, including high-value products such as foldable phones,” the company said in a statement. “However, there are concerns that a supply crunch of certain components such as DDIs may affect shipments for some customers.”

The non-memory chip business, called System LSI and foundry, reported improved earnings helped by Samsung’s Austin fab coming back online after a statewide power failure in Texas, according to Lee Su-bin, analyst at Daishin Securities.

“The anticipated increase in chip shipments is projected to lead to improved profitability” in the second half of the year, Lee said.

Samsung shares were little changed in Thursday trading. They had dropped just more than 2% this year through Wednesday.

Semiconductor shares have underperformed the KOSPI index as expectations about a “supercycle” turned to disappointment, said MS Hwang, analyst at Samsung Securities, citing a rise in chip production and concern over the sustainability of pandemic-induced demand. Samsung Electronics’s share price typically reflects the outlook for the memory market at least 6 to 12 months into the future, analysts said.

“In the near term, chip prices may lose some momentum and even trend lower but such concerns are already reflected in the market. We believe buying pressure will build in the not too distant future,” Hwang said.

Crosstown rival SK Hynix Inc. reported strong earnings for the second quarter earlier this week and projected the favorable market conditions to continue beyond the second half of this year. With the industry’s new DDR5 and 176-layer NAND memory chips set to be mass-produced later this year, Hynix sees the market trend toward high-capacity memory chips to drive demand in 2022. Hynix tends to give relatively bullish outlooks for the market going forward, while Samsung, which produces system chips as well as memory chips, tends to strike a more cautious tone.

Samsung will unveil Galaxy Z Fold 3 and Galaxy Z Flip 3 along with wearable devices on Aug 11. Instead of launching Galaxy Note series, Samsung will introduce its first S Pen for Z Fold. With prices lower than its previous foldable models, the company is likely to sell more fordable phones that’d improve profitabilities.

Samsung Boss Could Be Set Free by One of His Biggest Critics

Meanwhile, there is growing anticipation that Vice Chairman Jay Y. Lee could be freed from prison, perhaps on Aug. 15, South Korea’s Liberation Day. Multiple local media outlets reported President Moon Jae-in is considering granting a special pardon for Lee, while the Ministry of Justice is reviewing the possibility of a parole. Lee has been serving a prison term after being convicted in a corruption case.

(Updates with divisional details from fifth paragraph)

©2021 Bloomberg L.P.