WINDHOEK (Reuters) – Namibians voted on Wednesday in what was expected to be the toughest contest yet for the party that has ruled for three decades of independence, an election it was still expected to win despite a brutal economic crisis.

President Hage Geingob, Namibia’s third leader since the sparsely populated and mostly arid country freed itself from the shackles of apartheid South Africa in 1990, is seeking a second and final term from 1.3 million registered voters.

He faces nine challengers including Panduleni Itula, a dentist-turned-politician who is a member of the ruling SWAPO party but is running as an independent. Itula is popular with young people, nearly half of whom are unemployed.

Concurrent legislative polls will elect 96 members of parliament, testing SWAPO’s 77-seat majority. Polls opened at 7 a.m. (0500 GMT) and close at 9 p.m. (1900 GMT).

Results are expected within 48 hours.

Namibia’s ruling party has successfully tackled problems left over from decades of neglectful rule by a German colonial and later white minority South African administrations. The proportion of Namibians living below the poverty line fell by three quarters, from nearly 70 percent in 1993 to 17 percent in 2016, according to World Bank figures.

But now SWAPO is contending with an economy that has been in recession for nearly three years, one of Namibia’s worst-ever droughts and the biggest corruption scandal in its history — all of which have conspired to make this election unexpectedly tough for Geingob, who won by 87% last time.

“I campaigned like hell but if I lose I will accept that. I am a democrat,” Geingob told reporters shortly after voting.

The economy has been marred by a drought that ravaged agricultural export crops, as well as by unprofitably low prices for Namibia’s main hard commodities, uranium and diamonds.

The Bank of Namibia expects the domestic economy to contract for a third year in 2019, by 1.7%.

A scandal in which two ministers were alleged to have conspired to dole out fishing licences to Iceland’s biggest fishing firm, Samherji, in return for kickbacks has also taken the shine off the ruling party.

Yet loyalty to the former guerrilla movement remains high.

“Namibia has gone through a very terrible time,” Leevylee Abrahams said, after casting his vote. “But I’m voting for continuity because I believe that this government can really improve the lives of people, given a chance again.”

Whether the result is close or not, a SWAPO win is likely to be controversial, especially since the court threw out a case mounted by the opposition against the use of electronic voting machines it fears will be used to cheat.

The military said in a statement it was on high alert for violence, which Namibia has avoided in previous polls.

Writing by Tim Cocks; Editing by Paul Tait