Al-Mahdi, who was 84, died in the United Arab Emirates, where he traveled for treatment after the virus was infected, his family said in a statement.
He led Sudan twice as prime minister, first in the 1960s and then from 1986 to the 1989 coup.
As the leader of the opposition National Umma Party, Al-Mahdi has become one of Bashir’s fiercest critics and has lived long enough to witness Bashir overthrow the army amid mass protests last year.
From a century-old religious leader, “The Mahdi of Khartoum” who fought against British and Ottoman rule, Al-Mahdi led the Anshar Sufi order, one of Sudan’s largest religious groupings.
The U.S. Embassy in Khartoum “expressed its deepest condolences to the people of Sudan” and to Al-Mahdi’s “family and friends.” on Thursday with a tweet.
Al-Mahdi recently criticized U.S. President Donald Trump in October and his announcement that Sudan and Israel had agreed to normalize relations.
Sudan has so far reported 16,649 cases of coronavirus and 1,210 deaths, according to Johns Hopkins University.