Top Facebook executive Joel Kaplan made an emotional appearance at a companywide town hall Friday, and admitted that he should have consulted his superiors before attending last week's Brett Kavanaugh hearing, according to sources.

Why it matters: Facebook is trying to contain internal fallout from employees who were dismayed by Kaplan's appearance at the hearing sitting behind his friend Kavanaugh, who he served with in the administration of George W. Bush.

Facebook sources said Kaplan, Facebook’s vice president for global public policy, was solemn and contrite as he said he recognized the difficult situation he had put the company in.

Refusing to bow to the attacks, Kaplan explained the tensions between his personal and professional obligations, and said he had a personal obligation to Kavanaugh and his family.

Kaplan said he should have talked to Zuckerberg and Sandberg first, according to a Facebook official. Asked whether he had regrets, Kaplan said his core values include friendship and loyalty, and he declined to say if it was a mistake to go.

Facebook CEO Mark Zuckerberg and COO Sheryl Sandberg also appeared at the town hall, which was livestreamed to all employees, and made it clear they considered Kaplan's appearance a big mistake. A Facebook spokesperson declined to comment on the record.

Zuckerberg said he understood a lot of Facebook employees were upset by the appearance, and expressed frustration that Kaplan had put the company in the middle of a political story, an official said.

Zuckerberg added that Facebook is a place where people can have diverse points of view.

Sandberg talked about the seriousness of sexual assault, and noted it is a pervasive issue in the country. She also expressed support for employees who did not share colleagues' concerns about Kaplan's attendance at the hearing.

Facebook management characterized Kaplan's appearance as a lapse of judgement on his part, according to one listener.

Speakers said Kaplan was there in his personal capacity on a personal day.

A Facebook employee who viewed the event characterized the meeting as "intense," and added that people were not expressing hostility but more incredulity at the situation.

This story has been updated to include more information about the meeting.