BERLIN, GERMANY - JULY 11: German Chancellor Angela Merkel (CDU) arrives for the weekly cabinet meeting in the German Chancellory on July 11, 2018 in Berlin, Germany. (Photo by Michele Tantussi/Getty Images)
Michele Tantussi/Getty Images Europe/Getty Images
BERLIN, GERMANY - JULY 11: German Chancellor Angela Merkel (CDU) arrives for the weekly cabinet meeting in the German Chancellory on July 11, 2018 in Berlin, Germany. (Photo by Michele Tantussi/Getty Images)
Now playing
01:21
Angela Merkel's Bavarian allies lose majority
BERLIN, GERMANY - JULY 18:  German Chancellor Angela Merkel listens during a news conference with Thai Prime Minister Yingluck Shinawatra at the German federal chancellory on July 18, 2012 in Berlin, Germany. Yingluck, Thailand's first female prime minister, is on her first state visit outside of Asia since she took office in August of last year.  (Photo by Adam Berry/Getty Images)
Adam Berry/Getty Images Europe/Getty Images
BERLIN, GERMANY - JULY 18: German Chancellor Angela Merkel listens during a news conference with Thai Prime Minister Yingluck Shinawatra at the German federal chancellory on July 18, 2012 in Berlin, Germany. Yingluck, Thailand's first female prime minister, is on her first state visit outside of Asia since she took office in August of last year. (Photo by Adam Berry/Getty Images)
Now playing
02:15
Who is Angela Merkel?
Twitter/Steffen Seibert/German Federal Press Office
Now playing
01:41
Trump defends G7 photo: It was friendly
BERLIN, GERMANY - JANUARY 12: German Chancellor and head of the German Christian Democrats (CDU) Angela Merkel during statements following all-night preliminary coalition talks on January 12, 2018 in Berlin, Germany. The leaders signalled the talks have ended in success. The parties will likely soon beging the arduous process of coalition negotiations.  (Photo by Steffi Loos/Getty Images)
Steffi Loos/Getty Images Europe/Getty Images
BERLIN, GERMANY - JANUARY 12: German Chancellor and head of the German Christian Democrats (CDU) Angela Merkel during statements following all-night preliminary coalition talks on January 12, 2018 in Berlin, Germany. The leaders signalled the talks have ended in success. The parties will likely soon beging the arduous process of coalition negotiations. (Photo by Steffi Loos/Getty Images)
Now playing
02:02
Germany's SPD votes to join Merkel coalition
German Chancellor  Angela Merkel speaks to the media the day after the CDU won 32.9% of the vote and a first place finish in yesterday's German federal elections on September 25, 2017 in Berlin, Germany.
Maja Hitij/Getty Images Europe/Getty Images
German Chancellor Angela Merkel speaks to the media the day after the CDU won 32.9% of the vote and a first place finish in yesterday's German federal elections on September 25, 2017 in Berlin, Germany.
Now playing
01:27
Merkel faces complex coalition building
German Chancellor and Christian Democrat (CDU) Angela Merkel (C) reacts to initial results that give the party 32,9% of the vote, giving it a first place finish, in German federal elections on September 24, 2017 in Berlin, Germany. Chancellor Merkel is seeking a fourth term and coming weeks will likely be dominated by negotiations between parties over the next coalition government.
Alexander Koerner/Getty Images
German Chancellor and Christian Democrat (CDU) Angela Merkel (C) reacts to initial results that give the party 32,9% of the vote, giving it a first place finish, in German federal elections on September 24, 2017 in Berlin, Germany. Chancellor Merkel is seeking a fourth term and coming weeks will likely be dominated by negotiations between parties over the next coalition government.
Now playing
01:59
Merkel's party receives lowest support in years
merkel go it alone sot_00000000.jpg
Reuters
merkel go it alone sot_00000000.jpg
Now playing
00:45
Merkel: We have to fight for our own future
German Chancellor Angela Merkel (R) and US President Donald Trump attend a panel discussion titled "Launch Event Women's Entrepreneur Finance Initiative" during the G20 summit in Hamburg, northern Germany, on July 8, 2017.
Leaders of the world's top economies gather from July 7 to 8, 2017 in Germany for likely the stormiest G20 summit in years, with disagreements ranging from wars to climate change and global trade. / AFP PHOTO / POOL / Michael Kappeler        (Photo credit should read MICHAEL KAPPELER/AFP/Getty Images)
MICHAEL KAPPELER/AFP/Getty Images
German Chancellor Angela Merkel (R) and US President Donald Trump attend a panel discussion titled "Launch Event Women's Entrepreneur Finance Initiative" during the G20 summit in Hamburg, northern Germany, on July 8, 2017. Leaders of the world's top economies gather from July 7 to 8, 2017 in Germany for likely the stormiest G20 summit in years, with disagreements ranging from wars to climate change and global trade. / AFP PHOTO / POOL / Michael Kappeler (Photo credit should read MICHAEL KAPPELER/AFP/Getty Images)
Now playing
00:47
G20 closes with rebuke to Trump
BERLIN, GERMANY - JULY 18:  German Chancellor Angela Merkel listens during a news conference with Thai Prime Minister Yingluck Shinawatra at the German federal chancellory on July 18, 2012 in Berlin, Germany. Yingluck, Thailand's first female prime minister, is on her first state visit outside of Asia since she took office in August of last year.  (Photo by Adam Berry/Getty Images)
Adam Berry/Getty Images Europe/Getty Images
BERLIN, GERMANY - JULY 18: German Chancellor Angela Merkel listens during a news conference with Thai Prime Minister Yingluck Shinawatra at the German federal chancellory on July 18, 2012 in Berlin, Germany. Yingluck, Thailand's first female prime minister, is on her first state visit outside of Asia since she took office in August of last year. (Photo by Adam Berry/Getty Images)
Now playing
01:43
Angela Merkel: Time is of the essence
Angela Merkel building walls NATO Berlin wall_00000000.jpg
Angela Merkel building walls NATO Berlin wall_00000000.jpg
Now playing
01:08
Merkel: Building walls doesn't equal success
New French President Emmanuel Macron, left, and  German Chancellor Angela Merkel wave to journalists at the chancellery  in Berlin Monday, May 15, 2017, during the first foreign trip of Macron after his inauguration the day before.  (Bernd von Jutrczenka/dpa via AP)
Bernd von Jutrczenka/dpa via AP
New French President Emmanuel Macron, left, and German Chancellor Angela Merkel wave to journalists at the chancellery in Berlin Monday, May 15, 2017, during the first foreign trip of Macron after his inauguration the day before. (Bernd von Jutrczenka/dpa via AP)
Now playing
02:26
Macron meets Merkel on first day in office
Adam Berry/Getty Images
Now playing
02:08
Angela Merkel: Germany's beloved 'Mom'
Angela Merkel press ocnference on December 23, 2016
Reuters
Angela Merkel press ocnference on December 23, 2016
Now playing
01:44
Former ambassador: Merkel can handle Trump
German Chancellor Angela Merkel attends a joint press conference with the Argentinian President at the Chancellery in Berlin on July 5, 2016.  / AFP / Adam BERRY        (Photo credit should read ADAM BERRY/AFP/Getty Images)
ADAM BERRY/AFP/AFP/Getty Images
German Chancellor Angela Merkel attends a joint press conference with the Argentinian President at the Chancellery in Berlin on July 5, 2016. / AFP / Adam BERRY (Photo credit should read ADAM BERRY/AFP/Getty Images)
Now playing
02:38
Merkel calls for full veil ban
German Chancellor Angela Merkel addresses the World Economic Forum in Davos
AFP/Getty Images
German Chancellor Angela Merkel addresses the World Economic Forum in Davos
Now playing
01:00
Angela Merkel is TIME's Person of the Year
Getty Images
Now playing
02:50
Why was Angela Merkel selected over Donald Trump?
German Chancellor Angela Merkel gestures as she addresses a press conference in Berlin on August 31, 2015. AFP PHOTO / JOHN MACDOUGALLJOHN MACDOUGALL/AFP/Getty Images
AFP/Getty Images
German Chancellor Angela Merkel gestures as she addresses a press conference in Berlin on August 31, 2015. AFP PHOTO / JOHN MACDOUGALLJOHN MACDOUGALL/AFP/Getty Images
Now playing
02:54
Merkel calls on EU countries to do more for migrants
(CNN) —  

The ruling Christian Social Union lost its majority in the Bavarian state parliament on Sunday in an election that is likely to rattle German Chancellor Angela Merkel’s fragile “grand coalition” government.

The Christian Social Union, or CSU – the Bavarian sister party to Merkel’s conservative Christian Democrat Union, or CDU – has dominated politics in the state since the end of World War II, ruling for all but three years over the course of nearly seven decades.

But that changed Sunday. The CSU got only 37.2% of the vote and fringe parties won a huge boost, according to preliminary official results released by the Bavarian State Office of Statistics.

The pro-immigration, environmentalist Greens ran in second place with 17.5%, increasing their support, while the far-right, anti-immigration Alternative for Germany party, or AfD, took 10.2% of the vote, giving it seats in parliament for the first time.

Speaking Monday, Merkel admitted that voters had lost trust in the government and said that her job was to “make sure that trust is won back.”

“I will work on that with as much vigor as I can,” she said.

Bavaria bore the brunt of the 2015 refugee crisis; at its peak, thousands of asylum seekers were crossing into the state every day. Since then, both Merkel and her CSU allies have been criticized for their management of the influx.

The turnout was significantly higher than in the last Bavarian election in 2013. Of the approximately 9.5 million eligible voters, 72.4% cast their votes, compared to 63.6% in 2013.

“This is a difficult situation for the CSU,” Interior Minister and CSU party head Horst Seehofer said Monday, acknowledging that his party would need to find a coalition partner in Bavaria.

There had been speculation that a bad result for his party could force Seehofer to resign but he refused to address that issue Monday.

“I will not conduct any personal discussions about me today,” he said.

CSU State Premier Markus Soeder had ruled out a coalition with the AfD in the run-up to the election and Seehofer made the same pledge Monday.

AfD: ‘Merkel must go’

The outcome is likely to have an impact on Merkel’s coalition government, which took four months to form through difficult negotiations and has come close to imploding over migration issues and a scandal involving the country’s spy chief.

The CDU has accused CSU members of pandering to far-right sentiments to prevent losing supporters to the anti-migrant AfD, in publicized infighting that has tarnished the image of the two parties.

German Chancellor Angela Merkel leads a fractured coalition.
Sean Gallup/Getty Images
German Chancellor Angela Merkel leads a fractured coalition.

The Social Democrats, known as SPD, also in Merkel’s grand coalition, lost their second-place spot in Sunday’s vote, winning 9.7% of the votes, around half what they had in the 2013 election. The CSU ran strong in 2013, winning 47.7% of the vote and taking 101 of 180 seats.

The election will shake up the 18th Bavarian state parliament, which will now have a total of 205 seats.

The CSU will hold 85 seats (compared to 101 seats won in the 2013 vote), the Greens 38 seats (compared to 18), Free Voters 27 (compared to 19), the SPD 22 (compared to 42), the AfD 22 and the FDP 11.

Speaking after exit polls had been released, SPD leader Andrea Nahles did not explicitly name Merkel but pointed to the Chancellor’s coalition as a reason for her party’s major setback on Sunday.

“It would seem we were unable to convince the electorate, and that is bitter. Certainly, one of the reasons why we did not do well in the elections is the poor performance of the grand coalition here in Berlin,” she said, adding that infighting had hurt all parties in government.

“One thing is sure: This needs to change.”

Alice Weidel of the right-wing Alternative for Germany (AfD) speaking to supporters after exit poll results Sunday in Mamming, Germany.
Sebastian Widmann/Getty Images Europe/Getty Images
Alice Weidel of the right-wing Alternative for Germany (AfD) speaking to supporters after exit poll results Sunday in Mamming, Germany.

Alice Weidel, the far-right AfD’s parliamentary group co-leader, said the exit poll showed there was “no longer a grand coalition in Berlin.”

“Those who have voted for AfD in Bavaria today also say Merkel must go, dear ladies and gentlemen,” she said.

“Clear the path for new elections, clear the path for policy in our country.”

Policy analyst Leopold Traugott from Open Europe told CNN that calls for a leadership change will grow louder from all three coalition parties: the CDU, CSU and SPD.

“The mood within Merkel’s ‘Grand Coalition’ has been terrible for months now, and will be even worse following this election,” he said.

“It is becoming increasingly clear to all parties involved that the current setup is not working in their favor.”

Merkel, now serving her fourth term, could find herself fighting to keep her job as party chair when the CDU holds its annual congress in December. To ward off a mutiny in her coalition, she may be pressured to shake up her cabinet before the congress.

’Lessons to be learned’

Soeder, the state premier from the CSU, said there were “lessons to be learned from Sunday’s painful results,” but as the frontrunner, the party still had the right to form government.

“Today is not an easy day for the CSU. We have not achieved a good result. We have achieved a painful result,” he said.

“We accept this result with due humility and we will have to learn our lessons from it. We have to analyze it. One thing is for sure: Despite certain debates and comments and forecasts, the CSU is not only the strongest party, it has remit to form government, and that has to be said as well in this context.”

Bavarian Governor Markus Soeder of the Christian Social Union (CSU) casting his vote in Nuremberg, Germany on Sunday.
Alexander Hassenstein/Getty Images Europe/Getty Images
Bavarian Governor Markus Soeder of the Christian Social Union (CSU) casting his vote in Nuremberg, Germany on Sunday.

The center-right CSU could be left in the awkward position of trying to form a coalition with the left-wing Greens, having ruled out any kind of alliance with the AfD. A preferable option for the CSU would be a coalition with regional protest party the Free Voters, who won 11.6% of the vote.

Bavaria appears to have followed electoral trends in other parts of Europe. Populist anti-migrant parties across the region have splintered traditional support bases on the left and right, leading to fractured election outcomes and more coalition governments.

CNN’s Atika Shubert and Nadine Schmidt reported from Berlin. Angela Dewan reported from London, and Sara Mazloumsaki and Karen Smith contributed from Atlanta.