The Turkish parliament in January approved restructuring the constitution to change the country’s parliamentary system of governance into a presidential one, which the opposition denounced as giving more power to Recep Tayyip Erdogan, whose picture hangs at Taksim Square in Istanbul.   (Sedat Suna/European Pressphoto Agency)

So far in a rancorous campaign season, the Turkish government or its opponents have invoked Nazi Germany, terrorist groups, fifth columnists and a Latin American dictator.

And that was in the campaign’s first two weeks.

There is more than a month to go before a referendum in April that will allow Turks to vote on constitutional amendments that could give Turkey’s dominating leader, President Recep Tayyip Erdogan, vast new powers and allow him to remain in office for more than a decade.

But already, the poisonous rhetoric surrounding the campaign has aggravated tensions in this sharply divided nation, raising fears about the aftermath of the vote. And the anger has surged beyond Turkey’s borders, upending its foreign alliances, including in Europe. On Sunday, as part of an escalating feud with the Dutch government, Erdogan warned that the Dutch would “pay a price” after Turkish ministers were prevented from visiting the Netherlands over the past two days.

The tensions have been building for months. Fistfights broke out in the Turkish parliament when lawmakers debated the proposed ­changes. Now, at campaign rallies, the referendum is portrayed as an existential struggle over the nation’s future, propelling Turkey either toward tyranny or stagnation. Abroad, the government’s nationalist rhetoric is beginning to have an impact on the war against the Islamic State in Syria, according to U.S. officials, who cite Turkey’s increasingly vociferous opposition to any battle plan that would include Syrian Kurds that Ankara regards as part of a terrorist group.

Incendiary arguments between Turkey and several European allies, including the Netherlands and Germany, erupted after Turkish ministers were prevented from addressing potential voters at rallies in both countries. On Saturday, after the Dutch government blocked Turkey’s foreign minister from visiting the Netherlands, citing security concerns, protests broke out in both countries, provoking angry recriminations amid an unexpected diplomatic crisis.      

“Shame on the Dutch government for succumbing to ­anti-Islam racist and fascists, and damaging long-standing Turkey-NL relations,” Ibrahim Kalin, Erdogan’s spokesman and senior adviser, wrote on Twitter on Sunday. It was a reference to a view that European governments were lashing out at Turkey in response to their own domestic pressures, and trying to siphon off popularity from right-wing, anti-immigrant parties in Europe as elections approach.

Erdogan has responded by associating both the German and Dutch governments with the Nazis.

Turkish Prime Minister Binali Yildirim waves as he arrives Feb. 25 at a rally officially opening the AKP Party “Yes” (Evet) constitutional referendum campaign at the Ankara Arena. (Chris Mcgrath/Getty Images)

The heated rhetoric is a reflection, in part, of how difficult it is to predict the outcome of the referendum. Polls have shown the country evenly split or have reflected a slight edge for a “no” vote, which would represent an embarrassing defeat for Erdogan, who served as prime minister for 11 years before becoming president in 2014.

“There is a lot at stake for the government, the party and the president,” said Soli Ozel, a professor of international relations at Kadir Has University in Istanbul. The vitriolic comments by some Turkish officials — which have included casting opponents of the constitutional changes­ as sympathetic to terrorist groups — underscored the government’s worry at polls showing the “no” forces gaining momentum, he said.

“They are concerned they will not be able to pull it off this time,” he said.

The amendments would transform Turkey’s government, by abolishing the post of prime minister in favor of what has been called the “executive presidency,” while enlarging the parliament and empowering the president to unilaterally issue decrees. Erdogan’s supporters argue that the changes­ would leave the president free to govern what has become an unruly state, hobbled by political instability and coalition governments, and as the country faces threats to its stability from foreign and domestic militant groups.

“This change will make Turkey stronger in the region, and it will act faster against threats from inside and outside,” the prime minister, Binali Yildirim, said at a rally for the “yes” vote last month in Ankara as he passionately advocated for measures that included the elimination of his job.

The government’s most ardent supporters, at least, enthusiastically embraced his arguments. “We’re concerned about terror,” said Nimet Buyukaras, a homemaker who had traveled from the far east of Turkey to attend the rally. “If he wins the referendum,” she said, referring to Erdogan, “it will all be better.”

Erdogan’s opponents have accused the government of playing on the public’s fears after a string of deadly militant attacks over the past few months. The more worrying backdrop to the referendum, they say, is the authorities’ crackdown on enemies and opponents after a failed coup attempt in July, resulting in the dismissals or arrests of tens of thousands of people.

Passage of the amendments would formalize the sweeping powers Erdogan claimed after the attempted coup, effectively transforming Turkey into a dictatorship, his opponents say. Or, as an informational campaign brochure distributed by the pro-Kurdish People’s Democratic Party, or HDP, whose leaders have been jailed in the past few months, puts it: “Can the deed of a country be given to one person?”

Erdogan arrives for a meeting in Istanbul on March 5. (Murat Cetinmuhurdar/Presidential palace via Reuters)

Members of the Nationalist Movement Party show their palms with the flag of Turkey imprinted during a gathering to start a campaign for “Vote No” on the constitutional referendum on Feb. 18 in Ankara. (Tumay Berkin/European Pressphoto Agency)

Paramilitary police escort the defendants as a trial opened in Mugla, southern Turkey, on Feb. 20 for dozens of people accused of attempting to kill Erdogan on the night of a failed coup attempt while he was vacationing with his family. The suspects face possible life sentences on charges that include attempted assassination, overthrow of the constitutional order and other crimes against the state in the July 15 coup attempt. (DHA-Depo Photos via Associated Press)

In a tight contest, the Turkish government is eager to turn out the expatriate vote, especially in Germany, which hosts a vast Turkish diaspora, including 1.4 million eligible voters, a majority of whom have tended to support Erdogan.

Campaigning in Germany by Turkish politicians in the past has sparked diplomatic rifts between Berlin and Ankara, but this time has been far more acrimonious. Across Germany, politicians have portrayed the Turkish vote as a power grab by Erdogan. The recent detention in Turkey of the German Turkish journalist Deniz Yucel, a correspondent of the daily Die Welt, has added to the outrage.

In the aftermath of the arrest, venues in at least five German towns canceled appearances by Erdogan surrogates, mostly because of what officials have called security concerns. Then came Erdogan’s reference to the Nazis — a burst of anger that many in Turkey, including some of the government’s opponents, considered justified and that may serve to bolster Erdogan’s support at home.  

In a series of increasingly stinging rebukes, German Chancellor Angela Merkel has accused Erdogan of trivializing the victims of the Nazis and demanded that he stop making the comparison.

Yet, at the same time, Merkel has stressed that Turkey and Germany were bound together in many ways, highlighting her delicate position as she navigates her relationship with the Turkish leader.

A man is shown selling packets of tissues on Feb. 23 in Istanbul. Turks will vote on 18 proposed amendments to the constitution of Turkey in a referendum scheduled for April 16. (Chris McGrath/Getty Images)

After more than 1 million asylum seekers arrived in Germany over the past two years — the majority of them Syrians, Iraqis and Afghans fleeing war, and traveling via Turkey — a European Union deal with Ankara to stem the flow of migrants has helped close down the route most of them used. Erdogan has threatened to open the floodgates again — something that could be politically devastating for Merkel, now locked in her own unexpectedly tight race for reelection.

“Merkel has a problem,” said Josef Janning, head of the Berlin office of the European Council on Foreign Relations. “She has been accused of licking Erdogan’s feet and being blackmailed by him and being afraid to speak her mind. . . . The problem is that Erdogan can pretend not to need Germany, not to need the E.U. But Merkel cannot pretend to not need Turkey.”

The Turkish vote is scheduled for April 16. Despite the early polls, “a lot can happen, to change the mood in the country,” said Ozel, the professor at Kadir Has University.

“If it’s a yes vote, by and large the current situation will have been legalized and legitimized,” he said. “If there is a no vote, the unhappiness of the presidency will be known by all.”

But Mehmet Simsek, the deputy prime minister, said in an interview with foreign journalists in Ankara on Wednesday that the vote would provide Turkey with a measure of “closure” — regardless of the result.

For now, given the government’s vast re­sources, Erdogan’s opponents still regard themselves as underdogs in the contest and have been searching for tactics that will help them prevail. In the past few weeks, opposition activists have been holding screenings of “No,” a Chilean film based on the 1988 plebiscite that ended the rule of strongman Augusto Pinochet.

The film depicts the scrappy, creative television advertising campaign that was used by the “No” campaign to defeat Pinochet in the plebiscite, which centered on the question of whether he should stay in power for eight more years. “People are desperate, and they don’t have much hope,” said Ebru Ozdemir, a representative of the HDP, explaining the popularity of the screenings. “This movie makes us hopeful.”

Late last month, the film, which was available on demand from a leading Turkish cable provider, was quietly removed.

Faiola reported from Berlin. Stephanie Kirchner in Berlin and Karen DeYoung in Ankara contributed to this report.