A deal between conservatives and Greens to form a governing coalition in Austria includes banning headscarves in school until the age of 14 and preventive custody for potentially dangerous individuals.

The measures are part of what conservative leader Sebastian Kurz describes as his tough stance on undocumented immigration and “political Islam”, aimed at appealing to his base but also to disillusioned former supporters of the far right, whose coalition with his party collapsed in May.

The agreement, whose details the parties outlined on Thursday, also contains concessions to Greens’s environmentalist demands, including raising taxes on flights out of Austria.

The deal reached on Wednesday will allow Kurz to office as chancellor and will bring the Greens to power for the first time.

At a news conference with Greens leader Werner Kogler, Kurz called the agreement “the best of both worlds”.

It includes raising the age until which girls are banned from wearing a headscarf in school to 14 from approximately 10, an extension of a policy introduced under Kurz’s last coalition with the far right.

It also includes reviving a disputed plan for preventive custody of potentially dangerous individuals, even if they have not committed a crime, which was put forward under the previous coalition after a fatal stabbing apparently committed by an asylum seeker in February.

Such measures will be hard for many Greens supporters to swallow. The coalition deal must still be approved by the Greens’s top decision-making body, the Federal Council, on Saturday.