BERLIN—German Chancellor Angela Merkel on Saturday promised that her government would do everything possible to assure public safety as she gears up for a tough re-election campaign next year.

“The biggest test is by far Islamist terrorism, which has also had us Germans in the crosshairs for several years,” Ms. Merkel said in her annual New Year’s address, listing the three terrorist attacks the country witnessed in 2016, with the latest killing 12 people in a truck rampage on a Berlin Christmas market last week.

“Our state does everything to guarantee its citizens security and freedom…In 2017 our government will promptly get under way and implement measures where policy or law changes are necessary,” Ms. Merkel said in remarks prepared for delivery Saturday evening.

Germany suffered its worst terror attack in years on Dec. 19 when Tunisian migrant Anis Amri rammed a truck into a busy Christmas market. The attack refueled a debate about security and whether the country’s safety was put at risk by Ms. Merkel’s decision to take in nearly a million asylum seekers last year. The debate is likely to dominate the campaign before parliamentary elections in the fall.