Early results have put the UPFA well in the lead.
However, the turnout was expected to be between 50 to 55 per cent of the country's 14 million voters, making it Sri Lanka's lowest ever in a parliamentary poll.
More than 7,600 candidates from 36 political parties stood in the election.
The opposition has accused the UPFA of violating campaign rules and warned before the election that the vote 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, saying the opposition is trying curry favour with Western governments it says are trying to undermine Sri Lanka.
But the accusations are unlikely to have made any major impact on voters, with the ruling alliance forecast to win more than half the seats in parliament.
The key question, therefore, will be whether the UPFA can secure the two-thirds majority Rajapaksa has said he wants to secure in order to amend the constitution - although he has not made clear what amendments he wants to make.
Opponents have said Rajapaksa might seek a change that would allow him to stand for office beyond the current two terms allowed.
Among those who campaigned for a seat in parliament is Sarath Fonseka, the former army chief and the defeated opposition candidate in February's presidential poll.
He was arrested shortly afterwards and is being held in military custodyawaiting court martial, but has continued to campaign from his jail cell for a seat in the capital, Colombo.
Fonseka 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, but 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 now contesting Thursday's vote separately.
But despite the end of the war and the 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.