Russia's security chief described the arrest of 33 Russian security contractors in Belarus as a presidential campaign stunt and warned Wednesday that it would have grave consequences for the ties between two neighbors and allies.

Authorities arrested the Russian contractors outside the capital of Minsk last week on charges of planning to stage mass riots amid an upsurge of opposition protests ahead of the Sunday election in which Belarusian President Alexander Lukashenko is seeking a sixth term.

Russia has demanded the release of the contractors for a private firm, saying they only were in Belarus because they missed a connecting flight to another country. The government in Minsk has further irked Moscow by raising the possibility that some of the contractors could be handed over to Ukraine, which wants them on charges of fighting alongside Russia-backed separatists.

Belarus President Alexander Lukashenko delivers his speech during a state-of-the-nation address ahead of Sunday's election in Minsk, Belarus, Tuesday, Aug. 4, 2020. Belarus's authoritarian leader is vowing to maintain a close alliance with Russia despite the latest tensions as he seeks a sixth term in office amid a surge of opposition protests. President Alexander Lukashenko's comments in a state-of-the-nation address ahead of Sunday's election contrast with his diatribes against Russia last week. (Maxim GuchekBelTA Pool Photo via AP)

Belarus President Alexander Lukashenko delivers his speech during a state-of-the-nation address ahead of Sunday's election in Minsk, Belarus, Tuesday, Aug. 4, 2020. Belarus's authoritarian leader is vowing to maintain a close alliance with Russia despite the latest tensions as he seeks a sixth term in office amid a surge of opposition protests. President Alexander Lukashenko's comments in a state-of-the-nation address ahead of Sunday's election contrast with his diatribes against Russia last week. (Maxim GuchekBelTA Pool Photo via AP)

Dmitry Medvedev, the deputy head of Russia's Security Council, sharply raised the stakes in the dispute Wednesday, saying that the Belarusian leadership has sacrificed bilateral ties for election tricks.

Without mentioning Lukashenko by name, Medvedev described the arrested contractors as part of a "simple political technology - to create an enemy image and to achieve a political result using that enemy image.”

Medvedev said that while Belarusian officials may be thinking, "We will invent something to deal with the Russians” after the election,he warned they would pay a price for their action.

FILE- In this file photo taken from video released by Belarusian KGB, State TV and Radio Company of Belarus on Wednesday, July 29, 2020, Belarusian KGB officers detain Russian men in a sanitarium outside in Minsk, Belarus. Last week, the Belarusian authorities opened a new investigation against her husband on charges of planning to stage "mass riots" in cahoots with 33 Russian private security contractors arrested on Wednesday. Russia has rejected the charges, saying the men were en route to another country. (Belarusian KGB, State TV and Radio Company of Belarus via AP)

FILE- In this file photo taken from video released by Belarusian KGB, State TV and Radio Company of Belarus on Wednesday, July 29, 2020, Belarusian KGB officers detain Russian men in a sanitarium outside in Minsk, Belarus. Last week, the Belarusian authorities opened a new investigation against her husband on charges of planning to stage "mass riots" in cahoots with 33 Russian private security contractors arrested on Wednesday. Russia has rejected the charges, saying the men were en route to another country. (Belarusian KGB, State TV and Radio Company of Belarus via AP)

“It's not only offending, it's very sad,” he said. “And it will entail sad consequences, too.”

Throughout his 26 years in office, the authoritarian Lukashenko has relied on Russian subsidies and loans to shore up his nation's Soviet-style economy but fiercely resisted Moscow's push for control over Belarus's economic assets.

The Kremlin turned the heat up on the Belarusian president earlier this year by withdrawing some of the subsidies and warning the government it would have to accept closer economic and political integration to continue receiving Russian energy at a discount.

Lukashenko denounced Moscow's position as part of Russia's alleged efforts to deprive Belarus of its independence.

The 65-year-old president alleged in a state-of-the-nation address on Tuesday that another group of “militants” had been sent to southern Belarus, but gave no details. He warned Moscow against trying to fuel tensions in his country, saying that the instability could spread to Russia.

In a move certain to anger the Kremlin even more, Lukashenko had a phone call Wednesday with the president of Ukraine. President Volodymyr Zelenskiy ashed for Belarus to hand over 28 of the arrested Russians so they can be prosecuted for fighting alongside Russia-backed rebels in eastern Ukraine.

Belarusian authorities claimed the arrested contractors worked for the Wagner company. The private military firm is linked to Yevgeny Prigozhin, a Russian businessman who was indicted in the United States for meddling in the 2016 U.S. presidential election.

Wagner has allegedly deployed hundreds of military contractors to eastern Ukraine, Syria and Libya.

Daria Litvinova in Moscow contributed to this report.