Thailand's lower house of parliament on Friday passed a controversial political amnesty bill that opponents fear would allow ousted premier Thaksin Shinawatra to return, prompting warnings of fresh mass protests.

Critics say the bill, which still needs approval by the upper house, will "whitewash" past abuses, including the killing of unarmed protesters, and risks unleashing another bout of political turmoil.

Lawmakers voted 310-0 in the early hours of the morning to pass the legislation, with four abstentions, according to a parliamentary official.

Government whip Amnuay Khangpha said the opposition Democrat Party -- which opposes the amnesty -- refused to take part in the vote, which came after about 19 hours of heated debate.

"The bill sailed through the second and third readings early this morning," he told AFP.

"The bill will now be submitted to the Senate," he said.

The opposition Democrat Party said it would keep up its efforts to kill the bill with further street demonstrations.

"We will continue our fighting in the street until the bill is aborted. There are other avenues such as by petitioning the Constitutional Court," said party spokesman Chavanond Intarakomalyasut.

Thousands of people joined a rally against the planned amnesty in Bangkok on Thursday evening, some wearing bandanas reading "Fight" and waving clappers with the slogan "Stop the amnesty for corrupt people".

"If a murderer kills someone and later he gets an amnesty, then the country will not be peaceful," said one of the protesters, Surapol Srimawong, without naming anyone specific.

"It would mean any leader can kill whoever and after killing he can issue the amnesty bill, then it would be terrible," added the 56-year-old from the northeastern province of Korat.

The ruling Puea Thai Party of Prime Minister Yingluck Shinawatra -- Thaksin's sister -- had ordered all its lawmakers to support the amnesty bill, which would cover crimes related to political unrest since 2004.

Supporters of the legislation say it will draw a line under years of turmoil culminating in mass pro-Thaksin "Red Shirt" protests in 2010 that left dozens of civilians dead in a military crackdown.

But human rights groups have said a blanket amnesty would allow officials and protest leaders to go unpunished for alleged abuses.

"By passing a whitewash blanket amnesty bill, Puea Thai Party turns Thailand into a pariah state that doesn't respect justice and human rights," Human Rights Watch researcher Sunai Phasuk warned.

In 2010, mass rallies by the Red Shirts against the previous government ended in the kingdom's worst civil violence in decades, with more than 90 people killed and nearly 1,900 wounded in street clashes and a military crackdown.

Thaksin, the former owner of Manchester City football club, lives in self-imposed exile in Dubai to avoid prison for a corruption conviction imposed in his absence in 2008.

He contends that the jail term -- linked to a controversial purchase of state-owned land by his wife -- was politically motivated.

In 2010 a court also seized $1.4 billion of the Thaksin family assets for abuse of power after he was targeted by an anti-corruption panel appointed by the post-coup junta to investigate him.

As well as pardoning people involved in political protests, the amnesty would also cover those accused of crimes by organisations set up after the 2006 coup, according to a copy of the bill seen by AFP.