Germany's economic might has often been attributed to small and medium-size companies, also known as the Mittelstand.

But as in the United States, the country's middle class is increasingly being crunched, a new report concludes.

The German Institute for Economic Research (DIW) says the middle class has declined just as rapidly in Germany as it has in the United States -- and some fear  it could have similar political repercussions and continue to polarize both societies.

Germany 's recent economic upswing is mostly considered a success story, as other countries such as France continue to struggle. But the new numbers show that few Germans have benefited from that boom -- feeding fears that more frustrated voters could turn to extremist parties or populist politicians in the next general elections in 2017.

Between 1991 and 2013, the number of people considered to belong to the middle class relative to the total population has declined by six percentage points both in Germany and the United States.

Meanwhile, the total income of the middle class has shrunk dramatically. In the United States, the total middle class income as a percentage of total income of every working age citizen declined by more than 10 percent between 1991 and 2013. In Germany, a similar decline could be observed. Although the number of top earners among the population only slightly increased, their total wages rose rapidly, particularly from the 1980s until the 2000s.

In both countries, migrants and foreign-born individuals are often forced out of the middle class and into lower paying positions. In Germany's case, that complicates the country's prospects for integrating the hundreds of thousands of refugees it has recently welcomed into the labor market.

And there is another, worrisome observation by the German researchers: Young workers are now more likely than before to join the workforce at low income levels.

In the United States, those issues have partially fueled the current election campaigns, particularly that of Bernie Sanders. Donald Trump has also capitalized on the growing frustration of white middle class workers.

That should serve as a warning for traditional German parties that have failed to address the issue should be concerned, the study's authors say.

A U.S.-style political earthquake ahead of general elections next year in Germany seems increasingly possible. The Alternative für Deutschland, a right-wing party that has mainly drawn support from older workers who have not benefited from the economic upswing, is currently the third most popular party in national polls.

It won support faster than any other German party in recent times, although it regularly shocked the German establishment with Trump-like proposals. One of its top politicians, for instance, suggested shooting refugees, including women and children, who tried to cross the border to Germany.

Also read: