South Africa President Cyril Ramaphosa on Sunday sought to clarify comments he had made during a summit earlier in the week, insisting that he was not favouring Russia over Ukraine.
"In declaring President Putin and the people of Russia as 'valuable friends and allies', President Ramaphosa was not projecting any particular country or block of countries as the enemy," his office said in a statement.
"It is through the policy of non-alignment that South Africa has been able to constructively engage with both Russia and Ukraine," the statement said.
Ramaphosa had made the initial comments about being a Russian ally during a BRICS summit in the Russian city of Kazan hosted by Russian President Vladimir Putin.
Ramaphosa's comments had led to a split in his own government, with the Democratic Alliance (DA), a former opposition party that is now a partner in an uneasy coalition, saying that it could not consider Russia or Putin to be an ally.
Sunday's communique from the president's office said "South Africa has also maintained its strong historical ties with the Russian Federation, whilst enjoying cordial diplomatic bilateral relations with Ukraine."
On Monday, South African Foreign Minister Ronald Lamola will host his Ukrainian counterpart Andriy Sybiga, with their talks set to include visa waivers for South African officials.
"This will enable South African officials to travel to Ukraine for peace formula meetings without visa logistical impediments," the statement said, which "signals South Africa’s commitment to growing diplomatic relations with Ukraine."
While South AFrica has sought to display neutrality in the war between Russia and Ukraine, it has been accused of leaning towards Moscow.
The close links between the two countries dates back to the apartheid era, when the Kremlin backed the African National Congress' liberation struggle.