At least 102 men were taken into custody in the Jaffna region when residents smashed two military vehicles, in a protest against the alleged sheltering of sex offenders by soldiers.
"Grease devils" is a common local term for men who sneak into private houses at night to molest sleeping women.
They are popularly said to cover themselves in grease to evade capture.
Tuesday's clash was the first outbreak of violence between troops and minority Tamils in northern Sri Lanka since the military crushed the Tamil Tiger rebels in 2009, ending nearly four decades of ethnic civil war.
The overnight unrest came a day after a mob killed a constable who tried to rescue a drunk fishermen mistakenly taken by residents to be a "grease devil", police said.
Fears about sex offenders have spread rapidly through the villages of Sri Lanka over the past month, and last week in the island's central region two men also suspected of being sex offenders were killed by locals.
Some Sri Lankans blame