Donald Trump’s new national security adviser attended a segregated university in South Africa, described by one of its former vice-chancellors as “routinely racist”.

Robert O’Brien, a relatively junior official appointed to the top White House post on Wednesday, went to the University of the Orange Free State under the South African apartheid system. O’Brien’s LinkedIn page says he was there in 1987, while still an undergraduate. He received a scholarship from Rotary International and according to its records he was there from 1986. The first black undergraduate was admitted in 1988.

South Africa at the time was considered a pariah state and faced wide-ranging academic, sporting and cultural boycotts, backed by the UN. The US imposed sanctions in 1986, after Congress pushed through the Comprehensive Anti-Apartheid Act, overriding a veto by Ronald Reagan. The law restricted trade and investment but did not curtail academic contacts.

Prof Jonathan Jansen, who was vice-chancellor of the university – now called the University of the Free State – between 2009 and 2017, said that at the time O’Brien was a student, the institution was “in short … a white, Afrikaans university for people then called Afrikaners – very conservative and routinely racist not only in their policies but in their practices”.

Jansen said in an email to the Guardian that there were “no black students or staff except those cleaning the place and working the gardens etc”.

Other staff members said a handful of black and mixed-race (“coloured” in the parlance of the apartheid system) postgraduate students may have been admitted before 1988, as well as some mixed-race undergraduates.

However, both the undergraduate and postgraduate student body was overwhelmingly white even in 1994 when the first free elections in South Africa marked the end of apartheid.

Children put up posters of Nelson Mandela in the run-up to South Africa’s first democratic elections in 1994. Photograph: Andy Hall/The Observer

Staff members who were at the university during the late 1980s describe it as one of the cultural institutions that underpinned the racist and repressive apartheid system, describing “a bastion of the culture that sustained apartheid”.

“Being critical of apartheid was not well-received, to be critical of the [apartheid] establishment was not well seen. Those who asked critical questions were ostracised,” said one UFS staffer, who asked not to be named.

The national security council did not respond to a request for comment. O’Brien was a special envoy for hostages in the state department when he was chosen last week to replace John Bolton.

It has also emerged that O’Brien has had contact with AfriForum, a controversial NGO in South Africa which campaigns to protect the culture and interests of the country’s white Afrikaans-speaking minority, and defends some elements of the apartheid legacy. The group has been at the centre of a series of high-profile rows over that legacy, most recently failing in an attempt to overturn a legal ruling designating the flying of the old apartheid-era South African flag as hate speech.

Last year the AfriForum CEO, Kallie Kriel, caused outrage when he said that although apartheid was “wrong”, not enough people had been killed during the apartheid era to justify it being called a crime against humanity.

O’Brien was quoted in a 2017 interview with AfriForum as saying: “In my opinion, South Africans are the most hospitable people in the world and I have especially experienced this at [UFS].”

O’Brien makes no mention of apartheid or his time in South Africa in his book While America Slept.

O’Brien is reported to have met his wife while at the university, and lists Afrikaans as a second language on his LinkedIn page. Afrikaans is the language spoken by many of those descended from the first waves of white settlers of what was to become South Africa in the 16th and 17th centuries, and was standardized in the late 19th century as part of a broader nationalist project among the white minority.

Afrikaans – a mixture of Dutch, other European and local languages – is also spoken by other communities, particularly in predominantly mixed race areas, and the majority of current Afrikaans speakers in South Africa are non-white, according to latest statistics.

A South African radio channel, Netwerk24, interviewed the chemistry professor Karel von Eschwege, who said he had been a close of friend of O’Brien while he was in South Africa.

Von Eschwege claimed O’Brien had wanted to come to personally investigate “the most hated political system” in the world: apartheid.

• This article was amended on 25 September 2019 to clarify the description of AfriForum.