Authorities in Cape Town have criticised a private security company that allegedly ordered black beachgoers to leave a fashionable South African beach over the Christmas holiday.

The city’s mayor and a senior municipal official dismissed claims by the PPA security firm that it was working for the city authorities when patrolling the beach at Clifton, an up-market coastal suburb.

Beaches, like many public areas, were segregated under white-minority apartheid rule, and have since been a flashpoint of racial tension in South Africa.

Beachgoers were told to leave Clifton Beach by PPA guards last Sunday, two days before Christmas.

“The city has at no stage given any authority to PPA to enforce by-laws,” Cape Town’s director for safety and security Richard Bosman said in a statement on Thursday. “The city has acted swiftly to address the conduct of PPA staff.”

On Friday Cape Town mayor Dan Plato reiterated that the security company “had no authority to ask anyone to leave Clifton Beach”, but added that “they asked people of all races to leave, and did not single out any race groups”.

But local activist Chumani Maxwele alleged that the guards had targeted black people on the beach, which attracts huge crowds over the holiday season.

“These private security guards are hired by the Clifton (residents), they are actually briefed to not allow black people who appear to look like they are from the townships or criminals onto the beach,” he told the News 24 website.

National government has weighed-in in the row, with Environmental Affairs minister, Nomvula Mokonyane saying on Friday that the “alleged interference and racial profiling of beachgoers by private security firms” is “unconstitutional and illegal”.

“South Africa belongs to all who live in it, black and white, and no spaces are for the exclusive use of any citizens based on their race, gender or creed,” said Mokonyane in a statement.

A politician Phillemon Mapulane who heads a parliamentary committee on environmental affairs, condemned the ejection of beachgoers as “barbaric and racist”.

PPA chief executive Alwyn Landman said that the company’s guards did not close the beach, but acted to protect local residents after alleged criminal activity caused “mayhem”.

The city has launched an investigation and urged persons who may have felt threatened or intimated by the security guards to call its emergency hotline or report to the police.

Early Friday evening some protesters started gathering at the beach for a vigil.

In 2016, South African estate agent Penny Sparrow likened black beachgoers to monkeys in a social media post, triggering widespread outrage. She was fined 150,000 rand ($A15,000).

In September, South African tourist Adam Catzavelos ignited another storm of protest after he used a racial slur in a phone video message from Greece, boasting that the beach had no black people on it.