"Be confident in your heritage. Be confident in your blackness," President Barack Obama told graduates and their families at Howard University's 2016 commencement ceremony.

Obama told the graduating class that success is based more on luck, not hard work, and those who achieve great things do so because the fates have shined brightly upon them.

Successful people are "just lucky," Obama said, Breitbart reported. "It wasn't nothing you did."

The 'Stop Hillary' campaign is on fire! Join the surging response to this theme: 'Clinton for prosecution, not president'

TRENDING: Alan Dershowitz sues CNN to halt 'malicious' attacks on innocent people

Obama also praised pop star Beyonce as an example of how far blacks have come since the era of civil-rights struggles. But he then blasted the U.S. justice system as unfair and discriminatory.

You can read Obama's full remarks here, or watch a video of the speech below:

"We can't just lock up a low-level dealer without asking why this boy, barely out of childhood, felt he had no other options," Obama said, Breitbart reported. "We have cousins and uncles and brothers and sisters who we remember were just as smart and just as talented as we were, but somehow got ground down by structures that are unfair and unjust."

Get the hottest, most important news stories on the Internet – delivered FREE to your inbox as soon as they break! Take just 30 seconds and sign up for WND's Email News Alerts!

He went on, speaking about the nature of success: "And that means we have to not only question the world as it is, and stand up for those African-Americans who haven't been so lucky – because yes, you've worked hard, but you've also been lucky."

Obama then characterized those who credit their success to hard work, rather than luck, as one of his pet peeves.

David Limbaugh's book chillingly documents the destructive "transformation" of the United States -- get "The Great Destroyer: Barack Obama's War on the Republic"

"That's a pet peeve of mine – people who have been successful and don't realize they've been lucky," he said. "That God may have blessed them; it wasn't nothing you did. So don't have an attitude."

The characterization was akin to his 2012 statement when he said those who achieved great success in business did so based on outside factors – that they "didn't build that" business on their own, but rather on the back of government support.