Demonstrators protest in front of the federal office of the FDP against the behavior of the FDP in the election of the parliamentary group and state chairman of the FDP in Thuringia as Minister President of the state of Thuringia.

The small German state of Thuringia has caused a political uproar in Berlin after the far-right Alternative for Germany (AfD) party helped to elect the state's new premier.

Thomas Kemmerich from the liberal, pro-business Free Democratic Party (FDP), is the first mainstream German politician to have been elected with the help of the controversial, anti-immigration AfD party.

The election of Kemmerich was itself a surprise as Bodo Ramelow, of the leftwing Die Linke party, had won Thuringia's state election in October and was expected to form a minority government in the region on Wednesday.

However, the AfD party joined forces with the Christian Democratic Union (the CDU, the party of Chancellor Angela Merkel) to back and elect Kemmerich. The election breaks a taboo among the country's mainstream parties, including the CDU and FDP, to ostracize the AfD.

Describing it as a "political earthquake," ING Germany's Chief Economist Carsten Brzeski said "the shockwaves of today's events have already reached Berlin and are unlikely to ebb away quickly ... In our view, today's events do not represent a shift to the right but illustrate that German politics have become more fluid."

The AfD is known to be a nationalist, euroskeptic party that rose to prominence in 2013 amid a wave of populist parties in Europe and opposition to euro zone bailouts.