SEOUL, South Korea (AP) — No leader and scorched Note 7 smartphones? No problem.

After a tumultuous year of surreal corruption scandals involving exotic horses and the jailed billionaire scion and one of the most embarrassing recalls in the consumer electronics history, Samsung stunned investors with another improbable record: the South Korean tech giant may have earned more than Apple and ended Intel's quarter century dominance in the semiconductor industry.

Seemingly invincible Samsung Electronics appears set to log record annual profit this year as exploding use of data in mobile devices and the "memory supercycle" help it surmount the jailing of its de facto leader and sidestep losses from its fire-prone Galaxy Note 7s.

South Korea's largest company reported Thursday record high quarterly profit and sales that likely will help it nudge aside Intel as the leading maker of semiconductors.

A Samsung shop in Seoul. (AP Photo/Ahn Young-joon)

Samsung also likely outstripped Apple in quarterly earnings for the first time as soaring use of connected devices and mobile data fueled demand for computer chips.

Samsung's bottom line is better than ever, even with its vice chairman and de facto chief Lee Jae-yong jailed as part of a corruption scandal that unseated former South Korean president, Park Geun-hye.

While Lee and Park battle allegations of bribery and other charges, Samsung is thriving thanks to tiny microchips called DRAM and NAND memory chips, which are needed to store and process data in servers and mobile devices.

Companies are adding server memory capacity to expand new server platforms and cloud services and handle artificial intelligence and other emerging services. Hardware manufacturers will likely increase orders of memory chips for smartphones as they launch new models later this year. Consumers also expect their handsets to be packed with higher memory storage, which increases memory demand.

The unprecedented boom in the memory chip industry dubbed the "memory super cycle" helped push Samsung's April-June net income to 10.8 trillion won ($9.7 billion), up 85 percent from 5.8 trillion won a year earlier.

Samsung Electronics shop in Seoul. (AP Photo/Ahn Young-joon)

Analysts had forecast 10.1 trillion won in net profit according to FactSet, a financial data provider.

Operating profit jumped 73 percent over a year earlier to 14.1 trillion won ($12.7 billion) while sales rose 20 percent to 61 trillion won ($54.8 billion), in line with Samsung's earlier guidance.

Despite relatively slow demand for smartphones and TVs, increased use of connected devices and mobile data is driving demand for server memory to store, analyze and process data. Memory chip prices have soared thanks to tight supply conditions, bringing unprecedented profitability to both Samsung and South Korea's No. 2 chip manufacturer, SK Hynix.

Nearly 60 percent of Samsung's quarterly income was generated by its semiconductor division, which booked a record operating income of 8 trillion won ($7.2 billion) on sales of 17.6 trillion won ($15.8 billion).

Samsung's other components business, which makes high-end display panels called OLED for smartphones, also saw solid gains in earnings after this spring's launch of new Samsung Galaxy smartphones using the advanced displays.

The Galaxy S8 series of smartphones recorded higher sales than their predecessors, helping the company's mobile business rebound from last year's crisis over Galaxy Note 7s that had to be recalled and eventually discontinued because they tended to overheat or catch fire. That fiasco cost Samsung more than $5 billion last year.

Samsung said its mobile business logged 4.1 trillion won ($3.7 billion) in operating profit. That is slightly lower than its year-earlier result due to higher component prices but nearly double the previous quarter's income

The good times for Samsung appear likely to put it ahead of its rivals.

Apple is forecast to report $8.2 billion in quarterly net profit when its financial results are disclosed on Tuesday, according to FactSet. April-June is typically a slow season for Apple.

Intel, due to report its earnings later Thursday, is expected to book $14.4 billion in quarterly revenue.

Samsung Electronics' Galaxy S8. (AP Photo/Ahn Young-joon)

Looking ahead, Samsung said its third quarter profit may take a hit from marketing expenses from its upcoming launch in its new Galaxy Note series smartphone.

But it still has a good chance of reporting its biggest annual earnings in its history this year.

The outlook for semiconductor demand is robust and the overall profit during the second half will grow thanks to memory chips and its OLED screens, Samsung predicted.

In the meantime, Samsung has largely insulated its day-to-day operations from Lee's legal troubles, though the longer term implications for Samsung's leadership remain unclear.

Both Lee and Park have denied wrongdoing. A court ruling on Lee's case is expected before Aug. 27, when his arrest warrant expires.

Lee Jae-yong, vice chairman of Samsung Electronics Co., arrives for his trial. (AP Photo/Ahn Young-joon)