NAIROBI, Kenya — In a historic ruling and a first in Africa, Kenya’s Supreme Court nullified on Friday the re-election of a sitting president, ordering a new vote to be held within 60 days after finding that the outcome last month had been tainted by irregularities.

It was a stunning moment for Kenya, one of Africa’s most populous nations, and for democracy in general. Kenya’s disputed presidential election in 2007 set off bloodshed that left at least 1,300 people dead and 600,000 displaced around the country.

But this time, figures across the Kenyan political landscape, including the president whose victory was wiped away, appeared to accept the decision and called on supporters to do the same.

The ruling also offered a potent display of judicial independence on a continent where courts often come under intense pressure from political leaders, analysts said.