Senegal's Justice Minister Ismaila Madior Fall told reporters against a backdrop of violence. can be arrested "at any time."
"The sentence must be carried out. This is an in-absentia case, and the measure can be carried out at any time," he said.
Sonko's PASTEF party said the court's sentencing was part of a political plot - and called on citizens to take to the streets.
Thick black smoke billowed from a central university campus, where protesters had set several buses alight and threw rocks at riot police, who responded by firing tear gas.
Sonko, 48, was accused of raping a woman who worked in a massage parlour in 2021, when she was 20, and making death threats against her. He denies wrongdoing and says the charges are politically motivated.
A criminal court cleared Sonko of rape, but found him guilty of a separate offense described in the penal code as "immoral behaviour towards individuals younger than 21."
This could prevent him from participating in February 2024 elections, according to Senegal's electoral law.
"With this sentence Sonko cannot be a candidate," said one of his lawyers, Bamba Cisse.
University law professor Ndiack Fall said Sonko could demand a retrial if he turns himself in to authorities. Sonko has refused to attend his court proceedings.
The rape case has triggered violent protests in the West African country since 2021. Sonko's supporters denounce the charges as a ploy to prevent him from running in next year's election. The government and the justice system deny this.
Sonko has garnered strong support among the young, many of whom have responded to his calls to take to the streets to protest against his judicial problems, prompting security crackdowns that have led to deaths.
Demonstrations are not uncommon in Senegal and typically increase around elections. But President Macky Sall's second term has been particularly turbulent for a country usually viewed as one of West Africa's strongest democracies.
Separately, Sonko is appealing against a six-month suspended prison sentence for libel. The implications of that case for his presidential bid are not yet clear.