BANGKOK (AP) — Thai lawmakers gave initial approval Thursday to a controversial bill to grant amnesty to people charged with political offenses during turmoil that began with a 2006 military coup.

The lower house of parliament voted 300 to 124 to accept the government-sponsored bill in principle after a two-day debate. Critics of former Prime Minister Thaksin Shinawatra fear it is an initial move toward allowing his return from overseas, where he fled to avoid jail after a conflict of interest conviction.

The bill is also opposed by some human rights groups that suggest it promotes impunity for rights violators, including both civilians and security personnel responsible for causing deaths in political unrest from 2008 to 2010.

The amnesty bill does not cover Thaksin or other political leaders.

The government’s firm parliamentary majority ensured the bill would easily receive initial approval, though the opposition Democrat Party tried vigorously to derail the proceedings by invoking legislative technicalities.

Opposition from outside parliament was unexpectedly weak, and fears of major clashes involving street protests were not realized. The fate of Thaksin, who was ousted by the coup after being accused of corruption and disrespect for Thailand’s revered monarch, King Bhumibol Adulyadej, arouses fierce passions that sometimes have erupted into violence.

In 2008, Thaksin’s so-called “Yellow Shirt” opponents occupied the prime minister’s offices for about three months and Bangkok’s two airports for a week. In 2010, about 90 people were killed when Thaksin’s “Red Shirt” supporters occupied part of downtown Bangkok for around two months before being swept away by the army.

The bill would cover most rank-and-file Yellow Shirt and Red Shirt members.

Thaksin, whose sister Yingluck Shinawatra is now prime minister, garnered large majorities in winning office, especially from rural voters who gained from his populist policies.

But critics, especially in Bangkok’s traditional ruling elite, accused him of corruption and abuse of power, charging he was imposing a “parliamentary dictatorship” and trying to usurp the king’s constitutional authority.

Even as the bill stands, it could still get derailed. A 35-person parliamentary committee will vet it to present another draft within seven days, after which the house must pass it twice more. Its signing by the king is a necessary but usually pro-forma formality.

The bill can also face challenges in the courts, an action the opposition Democrats have already threatened.

While Thaksin loyalists control the legislative branch, Thailand’s court system is closely associated with the country’s traditional elite, who generally abhor Thaksin.

Past court decisions tossed out two pro-Thaksin prime ministers in 2008 and sidetracked a government effort last year to amend the constitution, which was drafted under an unelected 2007 interim government that served for a year after the coup.