A Princeton University professor giving a commencement speech at Hampshire College in Massachusetts accused President Donald Trump of being a 'racist, sexist megalomaniac'.

Keeanga-Yamahtta Taylor, who is an assistant professor in African American studies at Princeton, delivered a roughly 20 minute speech to the graduating class of 300 students at the private liberal arts college on May 20.

'The president of the United States, the most powerful politician in the world, is a racist, sexist megalomaniac,' Taylor said roughly two minutes into her speech.

Scroll down for video

Keeanga-Yamahtta Taylor (above), who is an assistant professor in African American studies at Princeton, gave a commencement speech at Hampshire College where she accused President Donald Trump of being a 'racist, sexist megalomaniac'

'The president of the United States, the most powerful politician in the world, is a racist, sexist megalomaniac,' Taylor (left) said roughly two minutes into her 20 minute speech on May 20

'It's not a benign observation, but has meant tragic consequences for many people in our country - from terror-inducing raids in the communities of undocumented immigrants to his disparaging of refugees in search of freedom and respite.'

Taylor, who is the author of 'From #BlackLivesMatter to Black Liberation', suggested that political activism is the reason why the federal court has struck down Trump's executive orders that restrict immigration from several Muslim-majority countries.

'When Trump's first illegal Muslim travel ban was attempted, thousands of ordinary people flooded the airports around this country,' she said.

'And because of those protests, and the defiance they represented, that ban was stopped - not once, but twice.

'It is not enough just to be outraged. Injustice has to actually be defied.'

During her speech, she also stated that 'the status quo is increasingly intolerable'.

'The political and economic status quo in this country has failed over and over again to deliver a better way to the vast majority of people in this country,' Taylor stated.

'For millions of people, the status quo is increasingly intolerable. It gnaws away at the tiny threads that millions of people are hanging on to in their daily struggles to make ends meet.

'Now is the time for defiance. Perhaps most importantly, we need hope.'

Taylor, who has a doctorate from Northwestern University in African American Studies, said Trump has 'empowered an attorney general who embraces and promulgates policies that have already proven to have had a devastating impact on black families and communities.'

On May 12, Attorney General Jeff Sessions announced that he has instructed prosecutors to pursue the most serious charges possible against criminal suspects, reversing Obama-era policies and upsetting civil rights groups.

The graduating class of 2017 also heard from the school's president Jonathan Lash.

Taylor, who is the author of 'From #BlackLivesMatter to Black Liberation', also suggested that political activism is the reason why the federal court has struck down Trump's executive orders that restrict immigration from several Muslim-majority countries

He urged graduates to use their skills to improve the world for themselves and others.

'Fearless inventors and doers, the world needs you now more than ever,' Lash said.

'You can learn anything, invent what you need, build what you can imagine. You are the change.'

Hampshire College made headlines in 2016 when the school lowered its American flag to half-staff in respect of the violence happening across the country after Trump won the election in November.

The day before Veterans Day the flag was burned and later removed so that 'racist, misogynistic, Islamophobic, anti-immigrant, anti-Semitic and anti-LGBTQ rhetoric and behaviors' could be examined, according to Lash.

During Thanksgiving weekend, more than 1,000 veterans visited the college to protest the school's decision.

The college eventually replaced the flag and moved it back to its rightful place in early December.

Tuition at the private college is roughly $49,000 a year.