Mahdi's father was Somali and his mother was Kenyan.[1] They fled Somalia due to the Somali civil war, and Mahdi was born in a refugee camp in Kenya on May 28, 2003.[2][1]
As a freshman, Mahdi recorded 568 rushing yards, 333 receiving yards, and five total touchdowns, being named a finalist for the Jerry Rice Award.[6] After the season, he entered the transfer portal.
Texas State
Following his decision to transfer to Texas State University, Mahdi led the FBS in all-purpose yards through five games, recording 934 total yards.[7][8] In the first game of the season against Baylor, Mahdi tallied 83 yards rushing and two total touchdowns, in a 42–31 upset win.[9] Against Nevada, he rushed for a career-high 216 yards and two touchdowns.[10] The following week, Mahdi returned the opening kickoff 100 yards for a touchdown, while also rushing for three touchdowns, helping lead Texas State to a 50–36 victory over Southern Mississippi.[11] As a result of his performance, he was named the Hornung Award National Player of the Week.[12][13]
On December 9, 2024, Mahdi announced that he would enter the transfer portal.[14]
Arizona
On December 21, 2024, Mahdi announced that he would transfer to Arizona.[15]