ROME (Reuters) - When former Italian president Giorgio Napolitano tapped Matteo Renzi as prime minister in February 2014, he urged his younger colleague to change the constitution in order to make it easier to govern Italy.

Italian Prime Minister Matteo Renzi speaks during a media conference after a referendum on constitutional reform at Chigi palace in Rome, Italy, December 5, 2016. REUTERS/Alessandro Bianchi

Early this year, Napolitano fretted that Renzi was taking the wrong approach in doing so.

A referendum on the constitutional changes had been called. But instead of focusing the election campaign on the merits of the ambitious reform, Renzi had turned it into a de facto plebiscite on himself by promising to quit if people voted against the changes.

At a time when anti-establishment parties were gaining ground across Europe and when the Renzi government was struggling to revive an anemic economy, a popularity contest was a dangerous tactic, Napolitano believed.

“If Renzi loses, Italy will also lose a lot of credibility,” Napolitano, then 90, told friends at an April dinner, according to one person present. He said he had warned Renzi, 50 years his junior, that it was a “mistake to make this too personal”.

On Sunday, Renzi paid the price for that mistake. Sixty percent of Italians voted to reject the plans to abolish a directly elected upper house Senate and streamline the legislative process. Within an hour of polls closing, a chastened Renzi announced his resignation.

Interviews with a dozen government officials, ministers and close advisers show that Renzi persisted in effectively making the ballot a vote on himself – despite warnings from some of his closest advisors not to do so.

That allowed disparate politicians from opposition parties to join forces in egging on the electorate to oust him.

Even after acknowledging in August that the personalization had been a mistake, Renzi sidelined most of his own ministers to dominate primetime television shows, giving more than 20 major media interviews in the last week of campaigning alone.

Renzi’s defeat is the story of a personal gamble that went awry. But it also speaks to the fast-shifting loyalties of Europe’s electorate amid the rising appeal of populist parties across the continent.

Renzi stormed to power following a ruthless internal party coup less than three years ago, hailed as an anti-establishment figure determined to revitalize a lethargic country. But he was ultimately rejected by the very people he had tried to court, the young and disaffected, who viewed him as one of the elite.

Renzi is not disappearing from the political scene; he remains the leader of Italy’s biggest party and, at the age of 41, has time to craft a return to government. Still, his biggest rivals are the anti-system 5-Star Movement, founded by a populist former comedian.

SAFE BET

Renzi raised the stakes on his flagship reform early in his tenure. “I will bet all my political life on it,” he told Corriere della Sera newspaper in March 2014.

At the time it appeared a safe bet. The opposition party Forza Italia (Go Italy!) of former prime minister Silvio Berlusconi had given its support and opinion polls suggested that more than 70 percent of the electorate were in favor.

But Berlusconi soon pulled his backing as a broad policy pact with Renzi collapsed. That left the government alone as it embarked on the most comprehensive overhaul of the constitution since its introduction after World War Two.

It took two years of fierce debate before the changes finally got parliamentary approval in April. But because they involved altering the constitution, Renzi had to call a referendum to get it turned definitively into law.

That same month, with polls still predicting victory, Renzi hired the Messina Group, headed by Jim Messina who led U.S. President Barack Obama’s successful 2012 re-election bid, for help in developing his campaign strategy.

Messina at the time was also advising British Prime Minister David Cameron in his efforts to keep Britain in the European Union – an effort that failed.

Cameron’s defeat in the June “Brexit” referendum shocked Renzi, according to close associates. The premier drew two lessons: He would not repeat Cameron’s so-called “project fear”, which had predicted dire economic troubles in case of defeat. Renzi also decided he would not associate himself too closely to corporate leaders to avoid accusations that he was in the sway of big business.

Still, Renzi continued putting himself center stage, meaning that the merits of his reform were being drowned out. Messina found it hard to convince Renzi to do otherwise, a source close to the prime minister said.

“The prime minister needs to be a bit more malleable,” the communications maestro told the premier’s inner circle in July, provoking a burst of laughter, according to someone present. Messina’s office declined to comment.

GENIE HAS ESCAPED

Polls showed momentum slipping from Renzi in the summer.

In August, the premier finally acknowledged in interviews that he had been wrong to pin his future to the referendum. He tried to change direction by refusing to discuss the vote in connection with what he would do if he lost.

But the change in tack came too late: Leaders of the political opposition accused Renzi of trying to go back on his promise to resign.

“The genie had escaped and it was impossible to put it back in the bottle,” said Matteo Richetti, a lawmaker from the ruling PD who was in constant touch with Renzi.

In the three weeks before the Dec. 4 vote, the prime minister went back to his original strategy -- playing on his own appeal to try to sway voters and making clear he would indeed quit if he failed.

He also played the fear card, warning that defeat could open the door to a tax-hiking technocrat government and presenting himself as the only guarantor of stability.

Instead of keeping his distance from business leaders, he campaigned alongside Fiat Chrysler Automobiles Chief Executive Sergio Marchionne, even though a government minister urged against it.

“He didn’t listen,” the minister said.

The key campaign decision-making in the final weeks was taken by Renzi and a trio of most loyal supporters -- his spokesman Filippo Sensi, Reforms Minister Maria Elena Boschi and long-time political adviser Luca Lotti.

The quartet would speak every day to compare notes and discuss ideas. People on the fringes sometimes felt excluded and complained of poor communications.

“They haven’t given me any speaking points,” said one lawmaker from Renzi’s Democratic Party as he was about to appear on a television debate. “There is no coherent command center, you just have to hope you get the message right.”

But Renzi’s message ended up falling flat. He suffered a far heavier defeat than the polls had predicted.

“I have lost and I say it with a lump in my throat.” Renzi said in the early hours of Monday, announcing his resignation. “I think I did everything I possibly could.”