Everything you need to know about Germany's upcoming election

Terrorism, the refugee crisis and relations with the U.S. are major issues.

Here’s what you need to know about the upcoming German elections.

Who are the main players?

In a poll conducted earlier this month by Infratest-dimap and German public broadcaster ARD, Merkel earned her highest approval rating since the fall of 2015. Just over 64 percent of those surveyed at the beginning of June said they were satisfied with the job she has been doing as chancellor, making her the most popular politician in the country.

Often described as Germany’s center-left party, the SPD is the main opposition party. It’s the second-largest party in terms of voter support, after the CDU. Yet its working class base in urban areas has eroded in recent years as Merkel’s popularity has soared.

The SPD’s candidate for chancellor and Merkel’s chief political rival, Martin Schulz, has managed gain ground in the polls in recent months, but most analysts say he faces an uphill battle to unseat her. A former president of the European Parliament, he poses the strongest challenge to her 11-year reign as chancellor.

What role could smaller parties play?

Although several other smaller parties will be on the ballot, observers are likely to keenly watch results for the Alternative for Germany (AfD), a nationalist upstart that has rocked the German political establishment with its rejection of open borders, Islam, the euro and political correctness. While many experts initially saw the party as taking votes from the CDU in national elections, some now say the AfD could hurt the SPD.

Sudha David-Wilp, a senior fellow at the German Marshall Fund in Berlin, said the AfD has been losing ground during the past couple of months because of internal squabbling and the fact that voters are shying away from far-right parties in the wake of Brexit and Donald Trump’s election.

But with months to go before election day, that calculus could change, he told ABC News.

“If that is the case, the AfD will pull votes from both traditional parties — the SPD and the CDU," David-Wilp said.

Though there has been a significant drop in voter turnout in German parliamentary elections during the past two cycles, the rise of the AfD and other populist movements have drawn in many previous nonvoters across the country, making a higher voter turnout more likely this year, according to observers.

The Alliance ’90/the Greens occupies the liberal-leaning part of the political spectrum. It is not expected to see overwhelming national turnout. But the Greens, with its base of urban, well-educated voters, has used its strong environmentalist tilt to attract a growing number of liberal Germans.

The Left Party, a democratic socialist group, often attracts unhappy SPD members; its voter base is traditionally eastern German and working class.

What are the biggest issues?

A series of terrorist attacks — including a truck attack at a Christmas market that killed 12 people and injured dozens of others last year — has opened Merkel up to sharp criticism from nationalist groups.

Germany’s relationship with the Trump administration is at play. Trump is deeply unpopular in Germany, and almost all the candidates have been critical of his policies.

Who is expected to win?

Though the CDU and CSU lagged in polling late last year, Merkel’s fortunes have changed in recent monthsm after poor showings by the SPD in recent regional elections. Surveys show a close race between her and the SPD challenger, but most analysts predict Merkel will squeak by.

But a lot depends on how big — or small — of a victory the CDU and CSU achieve. It is very likely that the parties will have to join a so-called grand coalition, in which Merkel partners with her closest challenger from the SPD to form a coalition government, similar to what Theresa May did in the U.K.

Why are these elections significant?

Germany is Europe’s largest economy, and Merkel has long been seen as a steadying and unifying force on the continent. A loss for her could open the country up to fringe governments that are less apt to solidly support the EU and other European institutions. A Merkel loss could worsen the already tense relationship with Trump and the U.S.

Animosity toward Trump is broadly shared by German politicians, with Schulz regularly chastising Trump on the campaign trail. If Schulz becomes chancellor, many experts expect the relationship between the two world powers to fray further on major global issues, from the fight against terrorism to the migrant crisis.

But Karen Donfried, the president of the German Marshall Fund, said that even if Merkel loses, there aren’t likely to be any seismic shifts in U.S.-German relations.

“This election is not like what we saw in France, where there were two candidates at opposite ends of the political spectrum,” she told ABC News. “Both main political parties in Germany are essentially mainstream, so no matter who ultimately wins, the relationship with the U.S. won’t really suffer.”