MENLO PARK — Facebook CEO Mark Zuckerberg scolded employees this week for crossing out the phrase “Black Lives Matter” and writing “All Lives Matter” on the walls of the company’s headquarters.

In a leaked internal message, Zuckerberg said he and other leaders have told employees in the past to stop the behavior but it hasn’t ceased yet.

“I was already very disappointed by this disrespectful behavior before, but after my clear communication I now consider this malicious as well,” he wrote in the post.

The company has a physical wall at its headquarters where visitors and employees can write messages, and the 31-year-old CEO noted that crossing out a phrase is equivalent to silencing speech. Facebook declined to comment on the record about the incidents, which the company is investigating.

Zuckerberg’s stern remarks come as tech companies, including Facebook are trying to diversify a workforce that is mostly made up of white and Asian men. About 2 percent of Facebook’s U.S. workforce is black, and a smaller percentage are tech employees at the social media company, data from 2015 shows.

” ‘All Lives Matter’ is one of a number of coded phrases that tell employees of color that they don’t really belong. Similar to the damning praise of telling a Black man that he is articulate, or complaining that diversity efforts mean ‘lowering the bar,’ ” Freada Kapor Klein, a partner at the Kapor Center for Social Impact in Oakland, said in a statement. “It’s exactly these sorts of slights and micro-aggressions that cause talent of color to leave the job and contributes to the overall dismal diversity we see in tech.”

Facebook executives have noted in the past that diversity is also important for the tech firm’s business because it serves 1.6 billion users worldwide from various cultures. From training about bias to exposing minority students to careers in tech, Facebook has been ramping up efforts to recruit and retain a more diverse workforce. On Friday, more than 200 Bay Area black students from underserved communities are also scheduled to be at the company’s headquarters for a tour, career panel and other activities as part of a Black History Month celebration.

High-profile gender discrimination cases including the lawsuit that former junior partner Ellen Pao lost against venture capital firm Kleiner Perkins Caufield & Byers have also brought more attention to subtle forms of discrimination. In March, former Facebook employee Chia Hong sued the social media company, claiming she was discriminated against and harassed because of her gender and Taiwanese descent but dropped the lawsuit in October.

The “Black Lives Matter” movement started after 17-year-old black teenager Trayvon Martin was fatally shot in 2012 by neighborhood watch volunteer George Zimmerman in Florida. Zimmerman was acquitted of second-degree murder in 2013, sparking the movement and a nationwide discussion about racism.

Zuckerberg said in the memo to employees that the black community has dealt with a history of oppression and racism in the United States and that the phrase “Black Lives Matter” doesn’t mean other lives don’t, encouraging employees to learn more about the movement.

“This has been a deeply hurtful and tiresome experience for the black community and really the entire Facebook community, and we are now investigating the current incidents,” Zuckerberg said. Tech blog Gizmodo obtained the internal memo and first reported the story.

Some advocacy groups such as the Rainbow PUSH Coalition, which is led by well-known civil rights activist the Rev. Jesse Jackson, praised Zuckerberg for his remarks to employees.

“If that is the case, good for Mark for sticking to his convictions and setting a leadership example for all of Facebook,” Jackson said in statement.

Contact Queenie Wong at 408-920-2706. Follow her at Twitter.com/QwongSJ.