The government says the law is to make the country safer but the opposition sees it as an effort to stifle growing dissent fuelled by the fact that one family has held the presidency since 1967.
Under the new law, no protests will be allowed on main roads, in city centres or near government buildings.
They can not take place before 11:00 or after 18:00.
As has happened in recent years, the Togolese authorities may ban them anyway for other reasons.
The threat from terrorists is the reason the government has given for the new law.
But there is clearly an effort to keep a lid on growing dissent.
In a country where one family has been in power for so long, it is not surprising that people are becoming increasingly frustrated.
A tweaked constitution allows President Faure Gnassingbé to stay on until 2030 - by then the Gnassingbé family would have been in charge for 63 years.