CAIRO — A court in the Libyan capital, Tripoli, on Tuesday sentenced Seif al-Islam el-Qaddafi, a son of the former dictator Col. Muammar el-Qaddafi, to death in an act of retribution that had been the urgent demand of the millions of Libyans who rose up against the family’s rule four years ago.

The sentence, however, was made moot by the civil strife that has since engulfed the country. Mr. Qaddafi was sentenced in absentia because he is being held captive by a militia in the northwestern city of Zintan, and the group holding him does not recognize the authority of the Tripoli government or its courts. Most Libyans are now so preoccupied with the country’s internal conflicts that they long ago stopped paying attention to the trial or to the Qaddafis.

The Libyan news media said eight other senior Qaddafi government officials who are believed to be in the custody of the court had also been sentenced to death by firing squad. Those defendants included Colonel Qaddafi’s former spy chief, Abdullah al-Senussi, and a former prime minister, Al-Baghdadi Ali al-Mahmoudi. All those sentenced to death were convicted of directing war crimes against Libyans during the uprising against Colonel Qaddafi in 2011.

The death sentences had been expected. The news reports said eight others had been sentenced to life in prison, seven had been sentenced to 12 years and four had been acquitted. All were charged with crimes for their roles in the Qaddafi government. All the sentences are subject to appeal, although it is hard to know for certain who will control Tripoli and its courts by the time appeals are heard.