"When you got a hundred voices singin', who can hear a lousy whistle blow?" -- Newsies.

Instead of managing the Catalonia crisis well, Spain's central government has inadvertently provided the world with an illustration of what not to do.

The heavy-handed response to the region's desire for greater self-determination has empowered, and not weakened, separatists and has contributed to regrettable violence.

Absent a change of course on the ground that allows the two sides to engage in a constructive dialogue without a list of preconditions, Europe will -- and should -- find it increasingly untenable to stay on the sidelines and repeat that the crisis is just an "internal affair." This impasse warrants third-party mediation either by Europe or as part of a balanced international effort.

With hindsight, the most sensible approach for Madrid a few weeks ago would have been to take the high road and seek to reach an agreement on a referendum for Catalonia -- much the same way Westminster did with Scotland. Admittedly, the constitutional and legal setup in Spain is a lot more complicated than in the U.K., and would have required very careful handling. But, from the outset, the Spanish government clearly signaled it had no appetite to reach a political compromise to explore a possibility that was repeatedly favored by a majority of Catalans.

Once the Oct. 1 referendum was called unilaterally by Catalan officials, the central government again had the opportunity to take the high road. It could have allowed the region to pursue its referendum and, even if a large turnout gave resounding backing for independence (a big if given the polls at the time), wait to see if the political parties there could come up with a unified coherent approach. Instead, Madrid went out of its way to repress the referendum and complicate its aftermath.

As a result, the situation escalated into what is now a fragile and worrisome state.

Both traditional and social media are filled with photos of police-imposed blockades, grandmothers being dragged away from polling booths, Catalan firefighters being attacked by baton-wielding officers and hundreds of thousands demonstrating on both sides of the issue. The images of repression, in particular, have reinforced Catalan independence claims based on culture, unfair financial burden-sharing and threats by Madrid to revoke hard-fought autonomy rights.

The central government's overreaction also gave the separatists a justification for a low (below 50 percent) referendum turnout. With 90 percent of voters opting for independence, and with Madrid refusing to discuss the issue without an unacceptable set of preconditions, Carles Puigdemont, the "accidental" president of the generalitat of Catalonia, has been handed the perfect excuse to pursue a unilateral move toward independence this week.

Understandably, European Union officials and many national politicians have been watching the situation with mounting concern while emphasizing the importance of Spain's constitutional sovereignty. The spillover effects from a mishandled Catalonia would be unpredictable. They could range from being just another political distraction within Europe that delays yet again much-needed reforms, to providing fuel for separatist movements elsewhere, while also emboldening Central and Eastern European countries to challenge more the Western-dominated establishment. But by staying on the sidelines, Europe has inadvertently amplified Madrid's missteps.

Game theorists will readily see this as a poorly-handled and increasingly incoherent situation -- that is, a "cooperative game" that is being played uncooperatively. Mistrust and threats are now the norm. Moreover, given what has transpired so far, no single party can roll back the clock and none can impose an orderly and sustainable move forward. Yet the status quo is also untenable.

Rather than the current dialogue of the deaf, a better outcome requires that the principal parties engage in a credible and constructive negotiation. With the active participation of a group of European mediators, preferably supported by international participants, Catalan and Spanish officials need to sit at the bargaining table with an open mind and without preconditions. The longer it takes for a cooperative process to take root, the heavier the risk of further damage even as the threat of violence is already too high to ignore.

This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.

Mohamed A. El-Erian is a Bloomberg View columnist. He is the chief economic adviser at Allianz SE, the parent company of Pimco, where he served as CEO and co-CIO. He was chairman of the president's Global Development Council, CEO and president of Harvard Management Company, managing director at Salomon Smith Barney and deputy director of the IMF. His books include "The Only Game in Town" and "When Markets Collide."