Samsung Electronics Co.’s shares surged to a new high as the Korean company kept up its winning streak, defying shaky global smartphone demand and competition from increasingly hard-charging Chinese rivals.

The success of the South Korean company’s latest flagship Galaxy phones have fueled a 30 percent rally this year, outpacing Apple Inc.’s roughly 4 percent gain. That ascent has held firm even as Apple prepares to introduce a new iPhone, one of the highlights of the industry calendar. The Korean company’s stock closed 4.7 percent higher at a record of 1,640,000 won.

Samsung has begun to outshine its U.S. rival in everything from market performance to top-line growth. Korea’s largest corporation reported second-quarter profit that exceeded projections, buoyed by strong sales of the Galaxy S7 and aggressive cost cuts. It’s benefited from sluggish sales of iPhones as U.S. carriers promoted the Galaxy to high-end consumers, helping to reduce marketing expenses.
That may change after Apple’s latest gadget hits store shelves, an event that in years past soaked up consumer demand. Yet Samsung’s Note 7 plus-sized phone, released just this month, has earned strong initial reviews.

“The Note 7 is expected to outsell its predecessor and Samsung will be able to keep that spirit alive at least until early next year, because the upcoming iPhones won’t likely offer big surprises this time around,” said Lee Jae Yun, an analyst at Yuanta Securities Co. Lee said he may raise his price target on Samsung from the current 1.7 million won.

Samsung has made progress even as the smartphone market faces its slowest year of growth since the iPhone debuted in 2007. Smartphone shipments are on track to climb3.1 percent this year, compared with 11 percent in 2015 and 28 percent in 2014, according to IDC.

The Korean company has also been squeezed out of the top ranks in China, the world’s biggest phone market. Samsung has ceded its No. 1 position there and has dropped out of the top five handset makers. Apple has fared little better, tumbling to No. 5 behind Huawei Technologies Inc., Oppo and other domestic rivals, according to Strategy Analytics.

Globally, however, Samsung has the benefit of a massive components business that’s the leader in supplying memory chips and displays for personal computers and smartphones -- including those made by its Chinese peers. Prices for parts are also picking up despite sluggish economic growth across the globe, in part because of a move toward next-generation OLED displays. Samsung is investing heavily in organic light-emitting diode screens, expected to become standard in coming years.

It’s now also delving into new areas such as automotives. Samsung’s in advanced talks to buy some or all of the operations of auto-parts maker Magneti Marelli from Fiat Chrysler Automobiles NV, according to people familiar with the matter.

“Going big into car component business also creates excitement over Samsung’s business growth,” Lee said.