Facebook, a company already beset by controversies ranging from data breaches to misinformation campaigns, has now become embroiled in the heated political battle over Supreme Court nominee Judge Brett Kavanaugh.

Joel Kaplan, the company's vice president for global public policy, set off an internal revolt at the company's Menlo Park headquarters last week after he made a surprise show of support for Kavanaugh, a longtime friend, at the nominee's Senate hearing, company sources told NBC News.

Those frustrations have metastasized over the last week and Facebook will now hold a town hall meeting on Friday to address employees' concerns.

Mark Zuckerberg, chief executive officer and founder of Facebook Inc., from right, and Joel Kaplan, vice president of global public policy at Facebook Inc., in Paris, France, on May 23, 2018. Christophe Morin / Bloomberg via Getty Images

On message boards and internal emails, hundreds of Facebook employees have protested Kaplan's appearance at the hearing. Some suggested that it gave the impression that Facebook was siding with Kavanaugh, even as he stood accused of sexual assault. One employee called it "a protest against our culture, and a slap in the face to his fellow employees."

In a staff meeting last Friday, Facebook CEO Mark Zuckerberg defended Kaplan's decision to attend the hearing but said it was not something he himself would have done. On an internal message board, chief operating officer Sheryl Sandberg said she thought it was "a mistake for [Kaplan] to attend given his role in the company."

"Sexual assault is an issue society has turned a blind eye to for far too long — compounding every victim's pain," Facebook said in a statement. "Our leadership team recognizes that they've made mistakes handling the events of the last week and we're grateful for all the feedback from our employees."

The company declined to make Kaplan available for an interview with NBC News.

Kaplan and Kavanaugh both served in President George W. Bush's administration and have been friends ever since. Kaplan was a senior adviser to the president while Kavanaugh, who worked on Bush's legal team during the Florida recount in 2000, also served as assistant to the president and as White House staff secretary.

Sources at the company told NBC News that Kaplan had not informed other Facebook executives that he planned to attend the hearing. Still, Zuckerberg has stressed that Kaplan did not break company rules by being there.

For Facebook, the internal debate over Kaplan is one in a long line of headaches. In recent weeks, the company has revealed that it was subject to the largest data breach in its history and seen Instagram's co-founders depart amid frustrations with Zuckerberg's leadership.