Smartphone vendor Samsung was able to best its rival Apple to retake the number one U.S. market share position in the three months ending in May – but only just barely.

According to a new report from Kantar Worldpanel ComTech, Samsung is holding on to the crown by a thread, capturing 36.2 percent of the U.S. market share compared to Apple's 34 percent share. The iPhone vendor's share was up 4.7 percentage points from a year earlier despite Samsung's spring launch of its Galaxy S8 smartphone, Kantar's Global Business Unit Director Dominic Sunnebo said. Samsung's share was up from 32.9 percent in the prior quarter, but down slightly over 1 percent year over year.

“The Galaxy S8 launch helped Samsung regain the top position in the USA, but the bounce from the flagship launch was less than would be expected from a full product redesign,” Sunnebo commented.

The dual between Apple and Samsung will particularly be in the spotlight in the coming months, as both vendors plan iconic device launches.

Later this month, Samsung is expected to unveil its Galaxy Note 8 handset, a follow up to the flawed Note 7 that made headlines last year for its tendency to literally go up in flames.

Apple will take its turn in September with the launch of its 10th anniversary iPhone. However, early reports have indicated Apple is struggling to find a way to incorporate a new fingerprint scanner under the handset's screen and could face supply delays. In a research note obtained by AppleInsider this week, KGI Securities Analyst Ming-Chi Kuo predicted the iPhone 8 will launch with a limited supply of between 2 million and 4 million devices, though Kuo indicated production will quickly ramp up to hit a total of between 45 million and 50 million handsets this year.

On a global scale, Kantar reported Apple and Samsung continue to dominate smartphone sales, with Apple's iPhone 7 and 7 Plus in the top two spots and Samsung's Galaxy S7 and S8 in third and fourth, respectively.