Racially offensive texts by one San Francisco cop reveal that he had an apparent bias against African-Americans, Latinos, as well as gays.

The texts, obtained by CNN, and sent by Officer Jason Lai,are at the center of a Justice Department investigation of the San Francisco Police Department.

Lai makes insulting comments about President Obama and NBA star Lebron James in the texts.

“F— that nig,” he says.

Lai, who is Chinese, also calls African-Americans “hak gwai,” a disparaging remark in Cantonese.

“Sprained my ankle over these barbarians,” he says in another message.

He says one suspect “went to the hospital after he got shot lol..”

“Too bad none of them died,” he added. “One less to worry about.”

In another message, Lai compared African-Americans to “a pack (of) wild animals on the loose.”

His inflammatory texts were not just reserved for African-Americans, however. He referred to how a gay sergeant was “flaming”, referred to Indian people as “disgusting”, and referenced another person as a “beaner”.

Lai’s attorney, Don Noble, says the texts were taken out of context.

“It’s hard to say any of those things in context,” the lawyer said, “but there is context to it.”

Noble also insists that there is no evidence that his client engaged in racially biased policing.

Noble said the texts were “not reflective of who he is” and that “there is no evidence he carried out any of those sentiments as an officer.”

Chief Greg Suhr apologized to the public on Tuesday for the texts.

“I apologize to the public,” he said. “We are better than this.”

Chief Suhr again said he has zero tolerance for this kind of conduct.

“The message is clear to both the officers in the department and the public: We will not have this in the San Francisco Police Department,” he said. “The culture of this police department is, you demonstrate yourself to be a racist and a homophobe, and you’re not going to be a police officer in San Francisco.”