Billionaire tech investor and philanthropist Robert F. Smith stunned graduates of Morehouse College in Atlanta on Sunday, pledging tens of millions of dollars to wipe out their student-loan debts.

Wild cheers and astonished looks greeted Smith after he made the gift during his commencement address at the famed, all-male historically black college.

"My family is going to create a grant to eliminate your student loans," Smith told graduating seniors. "You great Morehouse men are bound only by the limits of your own conviction and creativity."

“You great Morehouse men are bound only by the limits of your own conviction and creativity.” --Robert F. Smith @RFS_Vista #MorehouseGrad2019 pic.twitter.com/rw1VGMHaPm — Morehouse College (@Morehouse) May 19, 2019

Smith called the gift "a little fuel" for the 396 students who comprise the Morehouse Class of 2019.

"On behalf of the eight generations of my family that have been in this country, we're gonna put a little fuel in your bus," the philanthropist said.

The billionaire pledged to pay up to $40 million to relieve the students' debt — and that eight-digit gift should be more than enough to cover all the grads' loans, a Morehouse rep told NBC News.

Smith's gift was so shocking, that graduating senior and magna cum laude Ross D. Jordan said he couldn't immediately grasp it.

"It was very surprising," Jordan told NBC News. "It took a couple of seconds for everyone to actually comprehend what was happening and it lit our hearts in a way we haven’t felt, as well as gave our parents a sigh of relief to know that the hard work is being paid off."

Smith told grads to "pay it forward" and do something that could ensure that "every class has the same opportunity going forward."

"When Dr. King said that the 'arc of the moral universe bends toward justice,' he wasn't saying it bends on its own accord. It bends because we choose to put our shoulders into it together and push," Smith said, quoting civil rights icon Martin Luther King.

Smith, who received an honorary doctorate from Morehouse during the ceremony, was a chemical engineer before going into investment banking and private equity.

The Cornell University alum founded, and is still CEO of Vista Equity Partners, which invests in software, data, and tech-driven companies.

He's believed to be the richest African American, worth $4.4 billion, according to the latest estimates by Forbes magazine.

"Technology is creating a whole new set of on-ramps to the 21st-century economy, and together we will help assure that African Americans will acquire the tech skills and be the beneficiaries in sectors that are being automated," Smith, 56, said during his address.

He rattled off a list of troubling numbers, showing how African Americans are still so much more likely to die of cancer or be stopped by police compared to white people.

"That’s our reality. This is the world you are inheriting," he said. "I don’t want you to think that I’m bitter, nor do I want you to be bitter. I call upon you to make things better, because the great lesson of my life is that, despite the challenges we face, America is truly an extraordinary country and our world is getting smaller by the day. And you are equipped with every tool to make it your own."

Smith added: "Today, for the first time in human history, success requires no prerequisite of wealth or capital, no ownership of land or natural resources or people. Today success can be created solely through he power of one’s mind, ideas and courage."

Tonga Releford, whose son Charles Releford III graduated from Morehouse on Sunday, estimated that he owes about $70,000 in student loans.

"I feel like it's Mother's Day all over again," she told the Atlanta Journal-Constitution.