The voting has been mostly peaceful but one 65-year-old man was shot dead after voting in the southern city of Moundou, according to officials quoted by the AFP news agency.

They said the unknown gunman had opened fire after being barred from voting because he didn’t have an electoral card and had stormed a polling station, along with others, shooting indiscriminately.

The local mayor said four people were arrested.

There have also been some opposition reports of irregularities.

As he cast his vote in the capital, N’Djamena, President Déby said he was proud to have fulfilled his promise to respect the deadline for “elections that will signal a return to constitutional order.”

“It’s up to the Chadian people to vote massively and choose their president,” he added.

Mr Masra wore a blue boubou, or traditional gown, as he voted, reports the AFP news agency.

“All those who have shown they want massive change must go and vote in massive numbers, peacefully,” he said after voting.

Laoukoura Sa-Ndoudjinang, 72, has little faith that the election will lead to any change but still went to vote.

“We don’t have free and credible elections in Chad because we can’t imagine that an electoral code would prevent representatives of political parties from having the result tally. It doesn’t make sense. If there’s a crisis tomorrow, I wouldn’t be surprised,” he told the BBC.

“My wish is for there to be free and transparent elections, so that the voice of the people would count. Governing a country with weapons isn’t normal.”

But Ibrahim Moussa Youssouf was more hopeful.

“The votes are being conducted under very good conditions, because there was great sensitization… The outcome would be such that Chad will change.”

Ten politicians who had been hoping to run, including two prominent figures, Nassour Ibrahim Neguy Koursami and Rakhis Ahmat Saleh, were excluded by the constitutional council because of “irregularities”. For example, Mr Koursami was accused of forgery.

But some have argued that the decision to bar certain people was politically motivated.

Another potential opponent, Yaya Dillo, was killed by security forces in February while allegedly leading an attack on the National Security Agency in the capital, N’Djamena.

Activists have called for a boycott of the election that they termed a ploy to lend a sheen of democratic legitimacy to the Déby dynasty.

Many are still in exile following a deadly crackdown on opponents following protests in October 2022.

Nevertheless, Chad’s election is a milestone for countries in West and Central Africa that have fallen under military rule since a spate of coups began in 2020.

It may serve as a template for juntas seeking to maintain political influence after first coming to power illegitimately.

The oil-exporting country of nearly 18 million people has not had a free-and-fair transfer of power since independence from France in 1960.

Idriss Déby overthrew Hissène Habré in 1990 and remained in charge for the following three decades until his battlefield death in April 2021 at the age of 68.

His son, now 40, took over in what opponents described as a constitutional coup and initially pledged to stay on as interim leader for just 18 months, a period that was later extended. He also said that he would not run for president.

Gen Déby has tried to dismiss concerns that he is part of a dynasty.

“If I am elected, I will serve my five-year term and at the end of my term, it will be up to the people to judge me. As for a dynasty, our constitution is very clear – a candidate cannot serve more than two successive terms, “ he told the France 24 TV channel.