The leaders of Germany's ruling coalition parties agreed at a meeting stretching into Thursday morning on a package of counter-terror measures, coalition sources said.
The measures include increasing police powers to deploy undercover agents and empowering Germany's intelligence agencies to exchange information with foreign partners, under clear conditions, according to a document on the meeting's conclusions seen by Reuters.
The ruling parties - Chancellor Angela Merkel's conservatives, their Bavarian allies and the Social Democrats - also agreed on the details of a planned integration law for refugees, a coalition source said, without giving details.
They plan to pass the integration law on May 24.
Around 1 million migrants arrived in Germany last year, many fleeing conflict in the Middle East. Interior Minister Thomas de Maiziere has been planning a new law that will require refugees to learn German and integrate into society.
Last month, German authorities stepped up security measures at airports, train stations and the country's borders with Belgium, France, the Netherlands and Luxembourg following terror attacks in Brussels.
The German coalition leaders planned to hold a news conference later on Thursday to give more details on the new counter-terror measures, coalition sources said.