By JUERGEN BAETZBRUSSELS (AP) â¿¿ The European Union has struck a deal on rules establishing who will pay for bank bailouts in the future without taxpayers having to foot the bill. The agreement reached by the EU's 27 finance ministers after seven hours of negotiations early Thursday is an important step toward establishing Europe's so-called banking union with the goal of restoring financial and economic stability to the recession-hit bloc. The set of rules determines the order in which investors and creditors will have to take losses when a bank is restructured or shut down, with a taxpayer-funded bailout being only a limited last resort. "That's a major shift from the public means, from the taxpayer if you will, back to the financial sector itself which will now become for a very, very large extent responsible for dealing with its own problems," said Dutch Finance Minister Jeroen Dijsselbloem. The ministers had failed to reach a deal in 19 hours of continuous talks last week, and their latest round of negotiations in Brussels came only hours before a summit of the EU's 27 heads of state and government. At the summit, the EU leaders are expected to take stock of the progress of the bloc's financial and economic policies. Exactly a year ago, EU leaders pledged to tackle the eurozone's financial crisis by introducing a banking union, which aims to give the supervision and rescue of banks to European institutions rather than leaving weaker member states to fend for themselves. Since its announcement the project has stalled on many fronts, not the least because richer countries fear they might have to pay for the banking woes of weaker countries. But Thursday's breakthrough gave the endeavor new credibility by establishing clear rules. "The talks were lengthy, quite difficult and intense," German Finance Minister Schaeuble said. "This is an important step. We make progress step by step" toward completing the banking union, he added.