Hungary's parliament has granted the government the right to seek temporary extra powers if it believes the country faces a heightened terrorist threat.
These include more public surveillance and increased scope to use the army.
Any request from the government would have to be approved by MPs and the new powers could be used for up to 15 days.
Critics said there was no justification for the constitutional change and opposition politicians have warned that the powers could be misused.
The BBC's Nick Thorpe in Budapest says the amendment - the sixth to Hungary's five-year-old constitution - is a watered down version of an earlier draft, which opposition parties opposed unanimously.
The governing right-wing Fidesz party had sought additional powers including the ability to inspect bank accounts, but this was rejected.
The new version passed with the necessary two-thirds majority thanks to support from the far-right Jobbik party.
However, other opposition groups and rights organisations including the Hungarian Civil Liberties Union and Amnesty International criticised the amendment, saying existing laws were sufficient and the government could not be trusted not to abuse its new powers.
The move to increase government powers came in the wake of the Brussels terror attacks, which Hungarian Prime Minister Viktor Orban said "should be considered as an attack on Hungary as well".
- Born 31 May 1963 in the small Hungarian village of Alcsutdoboz
- Trained as a lawyer at university in Budapest and later studied the history of British liberal political philosophy at Oxford
- Founding member of Fidesz
- Twice prime minister: 1998-2002 and 2010-present
- Married with five children
- Football fan and player (FC Felcsut)
Mr Orban has long riled many of his European colleagues with divisive domestic and foreign policies, including close ties with Russia.
Critics accuse him of imposing a conservative agenda on everything, from the media to the economy and religion.
Last year his government built a 175km (109-mile) fence along the border with Serbia to keep out migrants.
His comments insisting that Hungarians have "the right not to live together with populous Muslim communities" drew strong criticism from EU politicians.