Google CEO Sundar Pichai has no regrets about firing James Damore, the engineer responsible for a controversial diversity-related memo last fall, though he said the way it played out in public was unfortunate.

"I regret that people misunderstand that we made this decision because of a political belief one way or another," Pichai said on Friday in a filmed discussion with MSNBC and Recode. Pichai said he wished the story hadn't made it to the public "in such a polarized way."

Damore's memo, which circulated internally at Google before leaking to the press, claimed that there were fewer women in technology in part because of biological differences. The company fired him soon after, stating that parts of the memo were contrary to Google's "basic values" and code of conduct.

The firing sparked a debate, with some celebrating Google's swift action and others outraged at the company for allegedly defending political correctness at the expense of free speech and ideological diversity.

New York Times columnist David Brooks argued that Pichai should resign for how he handled the situation. Earlier this month, Damore even filed a lawsuit accusing the company of discriminating against conservative men.

Pichai said on Friday that Google didn't view the issue through a political lens, and rather made its decision to ensure that all employees felt comfortable at the company.

YouTube CEO Susan Wojcicki, who was also on stage for the interview, agreed that the firing was the "right decision."

"Revolution: Google and YouTube Changing the World" will air Friday, Jan. 26, on MSNBC at 10 p.m. ET / 7 p.m. PT.