MUNICH — They do not know each other, but Josef Mayerhofer, a construction manager, and Harold Fischer, a retired doctor, have at least two things in common.

Both have always voted for Bavaria’s dominant party, the conservative Christian Social Union, a key component of Chancellor Angela Merkel’s fragile coalition government.

And come Sunday, when Bavaria votes again, neither will do so this time.

They diverge on which parties will get their votes: one will vote left, and the other far right. The issue driving both? Migration.

At any other moment in Germany, a regional election in Bavaria would be merely a regional election in Bavaria. But in the current political climate, the vote is being closely watched as a referendum on Ms. Merkel’s migration policy — and a measure of how much German and European politics are being reshuffled by feelings over migration, the rise of the far right and the collapse of the political center.