Steven Spielberg urged graduates at one of America’s top universities to become heroes in a world “full of monsters”.

The Hollywood director told students at Harvard University that he was bullied as a child for being Jewish and that racism, homophobia and religious hatred was still prevalent around the globe.

“A hero needs a villain to vanquish, and you’re all in luck,” he said.

Filmmaker Steven Spielberg speaks at Harvard University
Filmmaker Steven Spielberg speaks at Harvard University (Steven Senne/AP)

“This world is full of monsters. There’s racism, homophobia, ethnic hatred, political hatred and religious hatred.

“As a kid I was bullied for being Jewish. This was upsetting but compared to what my parents and grandparents had faced, it felt tame because we truly believed anti-Semitism was fading and we were wrong.”

Steven told Harvard’s class of 2016 to question voices of authority, to seek “defining character moments” in their own lives and to learn from the past.

Steven Spielberg
Steven Spielberg (Steven Senne/AP)

He said anti-Semitism and Islamophobia were on the rise and told students to listen to other people’s stories and share their own.

“The only answer to more hate is more humanity,” he said. “We have to replace fear with curiosity.”

The director, who Harvard said was not paid for his speech, also urged graduates to “never lose eye contact” because too many people were “looking down at our devices”.

Steven Spielberg
Steven Spielberg (Steven Senne/AP)

And in an apparent jab at presumptive Republican presidential nominee Donald Trump, he added: “We are a nation of immigrants — at least for now.”

The celebrated filmmaker won Oscars for best picture and best director for Schindler’s List and best director for Saving Private Ryan. He earned a degree from California State University, Long Beach, in 2002, after dropping out of the school in the 1960s.