KAMPALA, Uganda — When Sharon Kemigisha and her husband joined a political movement growing out of this city's sprawling ghettos, they knew it might cost them their lives.

The National Unity Party, led by the reggae singer and lawmaker Robert Kyagulanyi — better known by his stage name Bobi Wine — was quickly evolving into the most popular challenger that Uganda’s president, Yoweri Museveni, had faced in 35 years in power.

Thursday’s elections will bring them head to head, but the government has unleashed a wave of intimidation and repression against the opposition party and its supporters, extinguishing any hope many had in a fair vote.

Kemigisha’s husband, a close aide of Wine’s, has spent the past two weeks locked up in a military barracks on what she says are preposterous charges of illegal possession of ammunition. Kemigisha, 28, is weeks from giving birth to their second child.

“I just thank God he is alive,” she said in an interview from the back seat of a car, where she felt safe talking to a journalist — another group that Uganda’s military has cracked down on. She sleeps at different friends’ houses most nights, fearing her own arrest. “We’ve lost friends, colleagues. We’ve buried them.”

At least 54 protesters were killed in November after Wine was arrested at a campaign rally, the second of three times he was arrested ahead of the election. Wine’s prominence has likely protected his life, analysts said. Another opposition candidate, Patrick Oboi Amuriat, was arrested on Monday for the ninth time since declaring his candidacy — this time over a traffic law barring people from sticking their heads out of sunroofs.

Wine has said all 23 members of his campaign team had been arrested, and the majority were still in jail.

Fred Enanga, a police spokesman, declined to comment on the arrests of opposition figures, including Kemigisha’s husband, but referred to a previous statement in which he justified the arrests as part of enforcement of social distancing protocols and blamed the deaths of protesters on Wine and “others who seek to incite.”

Taking to Twitter before the government ordered all social media to be blocked on Tuesday, Wine called the tactics “the kicks of a dying horse.”

The shutdown of social media came in apparent retaliation for Facebook’s culling of around 100 profiles on Monday it said were fake accounts spreading pro-government misinformation ahead of the election.

“This month, we removed a network of accounts and pages in Uganda that engaged in CIB (Coordinated Inauthentic Behavior) to target public debate ahead of the election,” Facebook’s head of communication for sub-Saharan Africa, Kezia Anim-Addo, said in an email.

Museveni’s spokesman, Don Wanyama, whose Facebook and Instagram accounts were shut down, alleged a foreign plot to influence the election.

“Shame on the foreign forces that think they can aid and plant a puppet leadership on Uganda by disabling online accounts of NRM supporters,” he said on Twitter.

Ugandan authorities say that public order and preventing the spread of the coronavirus are their utmost priorities, and they have imposed restrictions on campaigning in Kampala and almost all other Ugandan cities.

Breaches of social distancing guidelines had previously been cited in Wine and Amuriat’s arrests. Museveni has continued to campaign in ways that less obviously flout those rules, such as visiting the sites of development projects. His presence still attracts large crowds that are not dispersed.

The prospect of further violence looms over Thursday’s vote, and the military was already out in a show of might on Tuesday evening.

Wine and other leading opposition candidates urged their supporters to stay within 100 meters of polling stations rather than return home as the electoral commission has advised. If the past weeks have been any indication, the military would likely meet such action with violent dispersal.

“The terror, frankly, is unprecedented,” said Kizza Besigye, a veteran opposition leader who took on Museveni in four previous elections, at a news conference. “This election has witnessed untold violence. It gets worse and worse by the day.”

Last week, Wine filed a complaint with the International Criminal Court against Museveni and nine security officials, accusing them of incitement to murder unarmed protesters and authorizing the arrests and beatings of political figures and human rights lawyers. Wine also alleged that the Ugandan government has repeatedly tried to kill him since 2018.

Past Ugandan polls have been discredited by widespread allegations of rigging. The country hasn’t peacefully transferred power since independence from Britain in 1962.

Museveni has had the constitution changed twice to legally remain in power — once to remove term limits on presidents, the other to remove age limits. His next term would be his sixth.

While allegations of unfair tactics are already mounting, this election still feels different, opposition supporters said.

“You would have to be naive to think this is a fair election. But what’s different is the surge of support Bobi has from young people who’ve had a rough life — the people who make up the poverty and unemployment figures that we hear about our country,” said Patience Akumu, a human rights lawyer. “Bobi found deliverance in this life, rising to where he is. In him, they see the possibility of their own.”

Kemigisha sees herself in Bobi Wine. Like him, she grew up in a slum and has spent her life scrapping by. She migrated to Oman for two years where she worked as a maid for poor pay, and when she came back, she was crushed that what little money she saved wasn’t enough to change her station in life.

“There is a chain of problems in that ghetto that girls face: underage marriage, domestic abuse and loss of self-esteem. You are constantly told that you are nothing. That is what our presidential candidate wants to change, and that is what I want to change,” she said.

“We respect the democratic process, but I don’t expect my vote to be respected. If it is not, then we will wait for our candidate to give us a Plan B.”

Halima Athumani contributed to this report.