President Barack Obama has condemned comments allegedly made by the owner of a major US basketball team.

Donald Sterling, who owns National Basketball Association (NBA) side the Los Angeles Clippers, is accused of using racist language when talking privately to his girlfriend.

In a recording of the conversation, which appeared on the website TMZ Sports, a male voice said to be Mr Sterling questions his girlfriend's association with what he calls minorities.

Mr Sterling purportedly goes on to demand his girlfriend, named by the website as V Stiviano, should not bring black people to games played by his team.

He reportedly also tells Ms Stiviano, who is of mixed black and Hispanic ancestry, that she should not post pictures of herself with black people, including NBA legend Magic Johnson, on social media site Instagram.

The comments have ignited widespread anger in the US, where a large number of the NBA's players are black.

Speaking in Malaysia, where he is on a state visit, he said: "We constantly have to be on guard on racial attitudes that divide us rather than embracing our diversity as a strength.

Earvin 'Magic' Johnson criticised the comments

"The United States continues to wrestle with the legacy of race and slavery and segregation that's still there; the vestiges of discrimination.

"We've made enormous strides, but you're going to continue to see this percolate up every so often.

"And I think that we just have to be clear and steady in denouncing it, teaching our children differently, but also remaining hopeful that part of why statements like this stand out so much is because there has been this shift in how we view ourselves."

Los Angeles Clippers players also signalled their displeasure at the comments, by warming up for their match on Sunday wearing their team kits inside-out in protest.

In the recording posted on TMZ, the male voice said to be Mr Sterling says: "It bothers me that you want to … broadcast that you’re associating with black people."

The man specifically mentions former Lakers legend Magic Johnson on the recording, saying: "Don't bring him to my games, OK?"

"How about your whole life, everyday, you could do whatever you want … The little I ask you is not to promote it on that (Instagram) and not to bring them to any games…

"I'm just saying, in your lousy ******* Instagrams, you don't have to have yourself walking with black people."

Mr Obama said he was confident NBA commissioner Adam Silver would address the matter.

He said the NBA had "an awful lot of African American players, it's steeped in African American culture and I suspect that the NBA is going to be deeply concerned in resolving this".

Magic Johnson responded on Twitter, writing: "I will never go to a Clippers game again as long as Donald Sterling is the owner."

Mr Silver has said the NBA needs to confirm authenticity of the audio tape and interview both Mr Sterling and the woman in the recording. He called the tape "disturbing and offensive" and promised to investigate quickly.

A statement issued to TMZ by Mr Sterling and the Clippers said they did not know if the tape was legitimate or had been altered.

The statement says: "Mr Sterling is emphatic that what is reflected on that recording is not consistent with, nor does it reflect his views, beliefs or feelings.

"He feels terrible that such sentiments are being attributed to him and apologises to anyone who might have been hurt by them."