Britain says there is a high threat of attacks against foreigners in shopping areas in South Africa, two days after a similar advisory was issued by the United States embassy in Pretoria.
Africa's most industrialised country has a significant expatriate and tourist population but has seldom been associated with Islamist militancy.
South Africa's government said the country was safe following the US warning on Saturday.
The British government said upmarket shopping areas and malls in the commercial hub of Johannesburg and Cape Town, widely regarded as South Africa's tourism capital, were the main target areas in the suspected planned attacks.
"There is a high threat from terrorism. Attacks could be indiscriminate, including in places visited by foreigners such as shopping areas in Johannesburg and Cape Town," the British government said in a statement on its travel advice website.
"There is considered to be a heightened threat of terrorist attack globally against UK interests and British nationals, from groups or individuals motivated by the conflict in Iraq and Syria. You should be vigilant at this time," the statement said.
On Saturday, the US warned its citizens of possible attacks by Islamist militants on US facilities or shopping malls in South Africa during the month of Ramadan.
It was not immediately clear what triggered the warnings.
Security officials say there are no known militant groups operating in South Africa. It has only a small Muslim population.
South Africa's State Security Minister David Mahlobo said in a statement on Monday that "we remain a strong and stable democratic country and there is no immediate danger posed by the alert".