KUALA LUMPUR, Malaysia — Mahathir Mohamad, who served twice as Malaysia’s prime minister for a total of 24 years, was hospitalized on Wednesday after testing positive for the coronavirus. In an interview, Mr. Mahathir, 97, confirmed that he is considering a bid in the upcoming election.
In the interview with The New York Times on Tuesday, Mr. Mahathir said he was building support for his political party as it prepares for the election, which could be set by the current prime minister, Ismail Sabri Yaakob, for as early as November.
Mr. Mahathir said he did not want to seek a seat in Parliament himself, but that if no strong candidate emerged to lead Pejuang, the party he founded two years ago, he could decide that he had no choice but to run.
“The party wants me to contest,” he said. “I cannot just refuse if the party really needs me.”
His office said that he had been hospitalized on Wednesday for observation. During the 45-minute interview, Mr. Mahathir seemed slightly tired, but appeared to show no Covid symptoms. An aide said late Wednesday that his case was mild and that he was experiencing some coughing.
After some setbacks early on, Malaysia has done relatively well in handling Covid-19, with 85 percent of the population now fully vaccinated and businesses largely reopened. More than 36,000 people have died from the disease, but during the past week, the average number of reported new cases has fallen to about 2,500 per day and deaths to fewer than 10.
Mr. Mahathir, a trained physician, first entered Parliament in 1964 and was prime minister from 1981 to 2003 before stepping down. During his time in office, he gained a reputation as an outspoken, autocratic leader and presided over a period of rapid growth and modernization in Malaysia.
He said he had felt compelled to come out of retirement and run in 2018 at age 92 after revelations that the then-prime minister, Najib Razak, a onetime protégé, had diverted more than $1 billion in government funds to his own personal accounts.
Mr. Mahathir led a diverse coalition to victory — the first time an election resulted in a change of power since the Southeast Asian nation’s founding in 1957 — and once again became prime minister. But his government collapsed after 22 months when some members defected to form a new coalition government that included Mr. Najib.
Mr. Mahathir noted that one success of his short-lived government was to initiate the successful prosecution of Mr. Najib on corruption charges related to what became known as the 1 Malaysia Development Berhad scandal. Mr. Najib, exhausting his final appeal, was taken from court to prison to begin serving a 12-year sentence last week.
“This would not have happened if Najib had remained as prime minister,” Mr. Mahathir said.
He praised the independence of the judges who heard Mr. Najib’s case at trial and during his appeals and found him guilty at every level.
“This is something that shows the judiciary remains independent and they go by the rule of law,” he said. “He was given every chance to defend himself. But he couldn’t defend himself. The evidence was too glaring.”
In retrospect, Mr. Mahathir regrets the help that he gave to the young Mr. Najib — the son of one prime minister and nephew of another — eventually naming him to several cabinet posts.
Now, Mr. Mahathir said, he is motivated by the desire to bring down the current government, which remains allied with Mr. Najib.
“I will play a very big role,” he said. “I will be very active.”