|Rajapaksa has boosted his popularity and tightened his grip on power since the army defeated the Tamil Tigers [AFP]
The Sri Lankan president's party has won 22 out of 23 local councils in elections, according to results released on Sunday.
Victory for Mahinda Rajapaksa's United People's Freedom Alliance came as police investigated a gun battle in which three people were killed a day earlier.
Two factions within the national ruling alliance clashed shortly before polling closed, leaving a presidential aide and two of his bodyguards dead. More than a dozen people were seriously wounded.
Police said at least two officers were among those critically hurt in the shoot-out in the Kolonnawa electorate within the district of Colombo, the capital.
Official poll results showed that the UPFA swept the polls, but lost the most prestigious Colombo Municipal Council.
The fractured opposition faced a rout elsewhere, with Rajapaksa's party gaining large majorities in provincial towns.
At the site of the shootout, a curfew was lifted on Sunday, but police commandos and soldiers remained on the street to maintain law and order, a police spokesman said.
Bharatha Lakshman Premachandra, a 55-year-old presidential adviser, died of gunshot wounds along with two of his bodyguards when a rival faction within the ruling alliance opened fire minutes before polling ended.
Duminda Silva, a legislator considered Premachandra's rival, was also wounded in the confrontation and was in intensive care on Sunday after surgery to remove two bullets from his brain, hospital sources said.
The shooting has seriously embarrassed the government, which has yet to comment on the violence.
The elections, in which 1.5 million people were eligible to vote, were seen as a mid-term test for Rajapaksa, who won a second term for himself and his party in elections last year.
Rajapaksa has boosted his popularity and tightened his grip on power since government forces ended the country's decades-long civil war by defeating Tamil separatists in 2009.
The UN accused security forces of serious human rights abuses in the final days of the conflict.
Voters elected 420 members from among 6,488 candidates in the latest round of local elections.
Councils are responsible for maintaining utilities, but have no legislative powers. But political parties consider it important to secure the local bodies as a stepping stone towards national elections which are next due in 2016.