Investor and philanthropist Robert F. Smith surprised the Morehouse College class of 2019 with a special graduation gift: He’s going to pay all of their student loan debt.

"My family is going to create a grant to eliminate your student loans!" Smith told the graduates during his commencement address. “You great Morehouse men are bound only by the limits of your own conviction and creativity.”

His gift to the nearly 400 graduating seniors is about $40 million, according to the Atlanta Journal-Constitution.

"If I could do a backflip, I would. I am deeply ecstatic," Elijah Dormeus, a business administration major from Harlem in New York City who has $90,000 in student loan debt, told the Journal-Constitution.

Smith, founder of private equity and venture capital firm Vista Equity Partners, is worth about $5 billion, according to Forbes. He was the wealthiest African American in the country in 2018.

Get creative to pay for college:How to pay for college without going broke? Let us count the ways

Opinion:Student loans are problematic

He is the only African American to sign the Giving Pledge, the initiative created by billionaires Bill and Melinda Gates and Warren Buffet in 2010 to “help address society’s most pressing problems” by shifting “the social norms of philanthropy toward giving more, giving sooner and giving smarter.”

He pledged to give away half his net worth to causes that support equality for African Americans and protect the environment.

"I will never forget that my path was paved by my parents, grandparents and generations of African Americans whose names I will never know," he wrote. "Their struggles, their courage, and their progress allowed me to strive and achieve."

The billionaire had already pledged $1 million to Morehouse in January to create the Robert Frederick Smith Scholars Program and an additional $500,000 to design an outdoor study area for students.

“Robert F. Smith’s donation of $1 million for student scholarships will have a profound impact on the lives of deserving young men who have the desire to attend Morehouse College, but lack the resources,” Morehouse President David A. Thomas said in a statement. “We appreciate his generosity and his investment in a generation of students who will follow in his footsteps as global leaders and entrepreneurs.”

Sunday, Smith received an honorary degree from the college alongside Academy Award-nominated actress Angela Bassett and psychologist Edmund Gordon, a professor emeritus at Yale and Columbia universities.

Morehouse is a historically black college for men, according to the school’s website, that has produced alumni including Shelton "Spike" Lee, Martin Luther King Jr., Samuel L. Jackson and Herman Cain.

Free college?:Plans such as Elizabeth Warren's are pretty pricey. Some say her plan would benefit the rich most.

Federal student loan debt:An unpaid $1,250 student loan can become thousands more and land you in federal court

Contributing: David Carrig, USA TODAY

Follow N'dea Yancey-Bragg on Twitter: @NdeaYanceyBragg