SAN FRANCISCO (AP) — Apple is donating $2 million to two human rights groups as part of CEO Tim Cook's pledge to help lead the fight against the hate that fueled the violence in Virginia during a white-nationalist rally last weekend.

Cook made the commitment late Wednesday in an internal memo obtained by The Associated Press.

Cook also told Apple employees in the memo that he strongly disagrees with President Donald Trump's attempts to draw comparisons between the actions of the white nationalists and protesters opposing them. Cook believes equating the two "runs counter to our ideals as Americans," making him the latest prominent CEO to distance himself from Trump's remarks in the wake of the violence in Charlottesville, which left a woman dead and more than a dozen injured.

Apple is giving $1 million apiece to Southern Poverty Law Center and the Anti-Defamation League. It will also match employee donations to those two groups and other human rights organizations on a two-for-one basis.

Meanwhile, American Airlines will donate $150,000 to Habitat for Humanity of Greater Charlottesville, airline spokesman Matt Miller said.