BERLIN — Throughout the almost 11 years Chancellor Angela Merkel has been in office in Germany, her nation has been reassuringly stable in the midst of tumult throughout Europe, maintaining a steady economy and stolidly predictable politics.

But it is becoming increasingly clear that Ms. Merkel’s decision last year to allow hundreds of thousands of migrants to enter the country has set off aftershocks that continue to upend politics in Germany and beyond. And on Monday, a day after voters in Berlin dealt her party another stinging loss in the second regional vote in two weeks, she was left to convince voters that she was not out of touch with their anger and anxiety over the flood of immigrants.

“If I could, I would turn back time by many, many years to better prepare myself and the whole German government for the situation that reached us unprepared in late summer 2015,” Ms. Merkel said after meeting with leaders of her party, the center-right Christian Democratic Union. “Nobody, including myself, wants a repeat of this situation.”

In a speech that was at times personal, Ms. Merkel took responsibility for her party’s record-low showing in balloting in Berlin. She also acknowledged a role in the party’s humiliating third-place finish, behind the Social Democratic Party and a nationalist party, Alternative for Germany, two weeks ago in her home state, Mecklenburg-Vorpommern. She pledged to work to regain voters’ trust.