The South African government reacted angrily Wednesday to warnings by the United States and Britain about possible imminent "terrorist" attacks by Islamic extremists in the country's major cities.

Without naming the countries, a strongly-worded statement described the warnings as "alarmist" and said diplomatic action had been taken to register South Africa's "displeasure".

The U.S. said Saturday it had received information that "terrorist groups" were planning to carry out attacks in upmarket shopping malls in South Africa during the Muslim holy month of Ramadan.

Britain issued a similar alert two days later.

"The information provided as a basis for the latest terror alerts on South Africa has been found to be very sketchy," the government said in a statement.

"We have found the information to be dubious, unsubstantiated and provided by a 'walk-in' source based on questionable conclusions."

South Africa rejected "attempts to generate perceptions of government ineptitude, alarmist impressions and public hysteria on the basis of a questionable single source," it said.

"The South African government has demarched the affected embassies to register our displeasure," the statement added.

The U.S. and British embassies were not immediately available for comment.

South Africa, which has a Muslim minority of around 1.5 percent in a population of some 53 million, has so far escaped the jihadist attacks seen in several other African countries.