Turnout was lower than expected, however, at around 50 per cent of the electorate - Sri Lanka's lowest ever in a parliamentary poll.
Rajapaksa, who won the January presidential election, was looking to consolidate his power against an opposition movement that has been weakened and fragmented by the arrest of Sarath Fonseka, the former army chief.
After he was arrested in February on charges of sedition, Fonseka has run his campaign for a parliamentary seat while in detention.
He was Rajapaksa's main challenger in the January presidential elections, the first such polls held since Sri Lanka defeated separatist Tamil Tigers last May.
The opposition has accused the UPFA of violating campaign rules in the parliamentary vote and warned before the election that the poll would not be free and fair.
It accuses Rajapaksa of stifling dissent, encouraging cronyism and corruption and trying to establish up a family dynasty, with two of his brothers and a son running for parliament and other relatives occupying top government posts.
On the eve of voting Ranil Wickremesinghe, the former prime minister and leader of the main opposition United National Party (UNP), accused Rajapaksa of using state-owned vehicles and buildings for campaigning and turning the government-run media into a party mouthpiece.
"There was suppression of private media. Journalists were attacked and abducted by those connected to the government," he said.
|Opposition parties have accused Rajapaksa, centre, of trying to stifle dissent [Reuters]
Rajapaksa's government has denied the charges and claimed instead that the opposition was trying to curry favour with Western governments it accused of trying to undermine Sri Lanka.
Opponents have said Rajapaksa might seek a change that would allow him to stand for office beyond the current two terms allowed.
His political arch-rival, Fonseka,held in military custody awaiting court martial, is accused of planning his political career before he gave up his army post and of breaching regulations in purchasing military hardware.
He has denied the charges, and while he remains a rallying cry for the opposition, his arrest has fragmented the opposition, with parties that had backed him in a single coalition fielding candidates separately in parliamentary elections.
Despite the end of the war and the Tamil Tigers' defeat, security remained tight for the vote.
At least 20,000 troops were placed on duty to support police personnel at polling stations around the country.