MANNHEIM, Germany — In the current tussle for the future of Germany, Frauke Petry is what you might call the anti-Angela Merkel.

Where Ms. Merkel, the chancellor, has welcomed refugees, Ms. Petry, a rising far-right leader, has said border guards might need to turn guns on anyone crossing a frontier illegally.

Where Ms. Merkel has urged tolerance, Ms. Petry has embraced the angry populism now running through Europe and the United States.

“The preachers of hatred” was how the news weekly Der Spiegel characterized the new German right on its cover last month, emblazoned with a portrait of the petite Ms. Petry.