Samsung smartphones are at the center of a diplomatic spat between Iran and South Korea that erupted ahead of the Winter Olympics in Pyeongchang.

The Iranian Olympic Committee said its athletes were initially excluded from a giveaway of special edition Galaxy Note 8 phones that was arranged by the organizers of the games.

"The athletes didn't receive phones when they arrived in [South] Korea. The reason given was because of sanctions," said Mahmoud Abdollahi, spokesman for the Iranian Olympic Committee.

Iran summoned South Korea's ambassador over the incident and demanded an apology, Iranian state media reported. ISNA, a semi-official Iranian news agency, said the South Korean official was warned that the episode could have "dire negative consequences" for Samsung's (SSNLF) business in Iran.

The country's four athletes were later handed the gifts, Abdollahi said.

"The issue is that Iranian athletes were not treated equally and this goes against the spirit of the games," he added.

Related: Team USA's Olympic uniforms are wearable heaters

Samsung announced last month that it would be providing the special edition smartphones "as encouragement to do bigger things at the Olympic Winter Games."

The company and the PyeongChang Organizing Committee declined to comment on the dispute with Iran, referring questions to the International Olympic Committee (IOC).

In a statement on Thursday, the IOC said it would provide the phones to all participating athletes.

"These phones contain essential logistical and competition information," the IOC said.

Iranian athletes will be allowed to keep their devices. Those from North Korea will be asked to "only use them during their stay in PyeongChang," the IOC added.

Related: Americans aren't going to the Olympics. Here's why.

Samsung electronics are widely available in Iran, and not subject to international sanctions. Many Iranians turned to social media to express their anger at the treatment of the Olympic team and demand a ban on Samsung products.

"Our government and president Rohani should not allowed [sic] any South Korean products to enter Iran!," tweeted one user.

Our government and president Rohani ,should not allowed any of south korean products to enter Iran!



We can build all of them ourselves, and we have to support and buy our own products.#BanSamsung#BoycottSamsung#تحریم_سامسونگ #حمایت_از_تولید_ملی — خانم ایرانی (@khanomirany) February 8, 2018

Iran's semi-officlal news agency, FARS, said it was suspending an advertising deal with Samsung.

FARS "has removed [Samsung's] advertising banner from its website following the unsportsmanlike and dishonest action taken by Samsung at the Winter Olympics in Pyeongchang," it said in a statement.

--- Amir Daftari, Hami Hamedi, Alireza Hajihosseini, Vasco Cotovio and Sophie Jeong contributed to this report.