KOGELO, Kenya — Things are no less divisive in the Obama precincts here as they are across the Atlantic as Election Day looms.

President Obama’s relatives and others in his ancestral village are angry that the president’s half-brother Malik Obama has come out in support of Republican presidential nominee Donald Trump over Democrat Hillary Clinton.

Local leaders and close relatives of Mr. Obama, whose father was born in Kenya and who is seen as a source of immense national pride, met to place a curse on Malik Obama. Threats of violence have been made against the family apostate.

“We have decided to curse him,” said James Otieno, a clan elder. “He is not one of us here because he is eating with the enemy. Why can he disown Obama, who is respected around the globe? Obama’s presidency has helped this village.”

Located near Lake Victoria and a seven-hour drive to Nairobi, Kogelo is the birthplace of Mr. Obama’s father, Barack Obama Sr.

Mr. Obama’s stepgrandmother, 95-year-old Mama Sarah Obama, is the matriarch of an extended family related to the president.

Mr. Obama’s connections to Kogelo led the Kenyan government to install electricity, build roads and bring other improvements to the village during his presidency. Donors have set up schools, foundations for needy children and other institutions bearing the Obama name.

That was why Malik Obama shocked his family in Kenya and the U.S. in July when he declared his support for Mr. Trump.

The cursing ritual was planned after Malik Obama journeyed last month to Las Vegas to attend the last presidential debate and show solidarity with Mr. Trump.

The move was taken here as a clear snub to the American president, who has strongly criticized Mr. Trump’s fitness to serve.

Malik Obama “is a disgrace to this family and community,” said Nicholas Rajula, an Obama family spokesman and the president’s cousin who has visited the White House a handful of times in recent years. “As a family, we have decided to distance ourselves from him. He has always been jealous of Obama since he became the U.S. president.”

Still, many in Kogelo believe the half-brother will change his stance before the election, if only for the sake of family harmony. But Malik Obama has repeatedly accused Mr. Obama of doing too little for the American people or for his extended family in Kenya despite high expectations for his administration in both countries when he took office.

President Obama’s uncle, Said Obama, said he was disappointed in Malik for failing to support his half-brother and encouraging a political candidate who has criticized Muslims. Most members of Mr. Obama’s Kenyan family are Muslims, along with about 10 percent of the country’s population.

“Since he is a disgrace to this family, we have distanced ourselves from Malik’s relationship with Trump, whose utterances and threats against Muslims and Africans living in the U.S. have shocked the world,” he said.

Mrs. Clinton served as Mr. Obama’s first secretary of state and has often said she will safeguard the accomplishments of the first black U.S. president.

“As a family, we’ll stand with Obama and whom he supports,” said Mr. Rajula, the owner of a popular hotel in the village that features a statue of the president and restaurant called The White House. “Obama has brought fame to the village, and we’ll support Hillary Clinton.”

“As a community, we will not associate with anyone opposing our son Obama,” said Martin Ogada, a community elder.

Threats of violence

Some local residents have threatened violence against Malik Obama, regardless of who wins on Tuesday. They said Malik hadn’t been back to Kogelo since he left for Las Vegas.

“We no longer need him in this village,” said Erick Onyango, a taxi driver. “When he comes back from the U.S., we might be forced to attack him. He should live with Trump after elections because he has been supporting him.”

Kenyan analysts warn the villagers to stop criticizing Malik over his political stance in order to avoid violence.

“I think the family should ignore Malik and move on,” said Peter Wafula Wekesa, a lecturer at Kenyatta University in Nairobi. “When they continue to attack him, this will widen the rift in the family.”

The rift between the half-brothers stems from an episode this year when Malik visited the White House, the analyst said. Malik complained that Mr. Obama was not “warm and loving.”

Malik Obama probably doesn’t even agree with Mr. Trump’s policies but wanted to get back at the president for some perceived slight, Mr. Wekesa said.

“Malik and Obama have personal differences,” he said. “It’s not about politics; it’s all about personal reasons.”

Malik Obama maintains that he will vote for Mr. Trump despite the hostility and threats back home.

“It’s my democratic right to choose the president I want,” said the half-brother, who holds dual Kenyan and U.S. citizenship, speaking via phone. “I can’t support Obama because he has done nothing for Africa, Kenya and his own family in Kenya. I will vote for Mr. Trump because he is honest.”

Mr. Rajula has dismissed Malik Obama as petty and accused him of turning on his half-brother after unsuccessfully seeking money from him.

“Malik is supporting Mr. Trump for his own gain,” said Mr. Rajula. “Malik has no respect in the community. He also does not control the Obama family. As a family, we have disowned him because he is a disgrace.”