N'Djamena - Chad reintroduced the death penalty just six months after its abolition on Thursday, as legislators passed a stringent anti-terror bill in the face of a spate of deadly Boko Haram attacks.
After suffering two suicide bombings in a month, including one in a bustling market in the capital N'Djamena, Chad has beefed up security in recent weeks.
It has already banned the wearing of the full Islamic veil, and on Thursday local authorities in the capital imposed a ban on begging.
The government's draft law had raised fears among opponents and rights activists that it might be used to curtail freedoms, and legislators took its proposals much further, toughening sentences and giving the police greater powers in cases of suspected terrorism.
Beyond capital punishment for the most serious cases, penalties for lesser terror offences were increased to life from the current maximum of 20 years, and the duration for which suspects can be held by police without charge will be increased from 48 hours to 30 days, renewable twice.
Lawmakers passed the law unanimously, with 146 votes for and zero against, including zero abstentions. At least 40 or so deputies were absent, however, in a national assembly dominated by the ruling party of President Idriss Deby, who has held power since 1990.
Chad has helped spearhead a major regional offensive launched in early 2015 to fight the Nigerian militants, and N'Djamena is now set to host the headquarters of a new, more efficient multinational task force created in the face of a fresh surge of attacks.
Boko Haram 'windfall' for government
Opposition leader Saleh Kebzabo declared he was "relatively satisfied" with the law, as deputies had amended one article derided for an overly vague definition of terrorism.
A provision to safeguard freedom of expression and human rights was added to the final draft.
"No one wants terrorism," Kebzabo had said earlier, adding that the fight against Boko Haram has come as a "windfall to the Chadian government" and "allows for the organisation of repression before the presidential vote" slated for next year.
In June 2005, a constitutional revision adopted following a controversial referendum scrapped the limit to two five-year presidential terms. Itno was re-elected in 2006 and again in 2011.
Chad has taken steps to increase security since suicide attacks struck a school and a police building in N'Djamena in June, killing 38 people, and again in July, killing 15 in a market.
On Thursday, authorities in N'Djamena banned begging in the capital a week after two girls who were begging blew themselves up in neighbouring Cameroon.
In a country where Muslims make up 53% of the population - with Christians accounting for 35% - the ban on the veil, including the face-covering burqa, prompted mixed reactions.
The tough prohibition was a first in Africa, but several regions of Cameroon and Niger have since followed suit.
On Thursday, N'Djamena mayor Ali Haroun also ordered bars to shut at 22:00, except on Saturdays and on the eve of public holidays, when they are allowed to stay open until midnight.
In Cameroon, a 12-year-old girl suicide bomber killed 20 people last Saturday night in an attack on a bar in Maroua, which is situated southwest of the border from N'Djamena.
Raids and arrests by the security forces have shot up in recent months, with reports of hundreds of people detained in N'Djamena alone.
Amnesty International has condemned the "total impunity" in which serious rights violations take place in Chad.
"Human rights defenders, journalists and trade unionists were victims of harassment, intimidation, arbitrary arrest and detention," the London-based rights group said in its annual report for 2014-2015.