LISBON, Portugal — Portugal pitched European financial markets into turmoil Wednesday as the coalition government came close to collapse in a dispute over austerity measures before stepping back from the brink, reminding investors that the eurozone's debt crisis is not over.

The two governing parties found common ground late in the day when the junior coalition party, the Popular Party, agreed to hold urgent talks with the senior Social Democratic Party to resolve their differences and save the government.

But the spat reignited concerns over whether Europe can find an end to its prolonged financial crisis before more damage is done — a worry that has haunted investors. And the imminent threat of the Portuguese government's disintegration underscored the political perils of austerity, which is increasingly contested as a long-term solution because it chokes growth.

Popular Party official Luis Queiro announced in an evening statement after a day of tension that his party's two members of Cabinet will stay in their jobs "so as not to make it harder for us to overcome this crisis."

Popular Party leader Paulo Portas, whose resignation as foreign minister Tuesday threw the coalition into disarray, will meet personally with Prime Minister Pedro Passos Coelho to seek "a viable solution for the government of Portugal," Queiro said.

However, he warned his party will carefully examine future spending cuts.

The market turmoil was a reminder of the delicate path bailed-out countries like Portugal must tread to get their finances back on an even keel and the dangers they face.

The country's main PSI 20 stock index fell 5.3 percent to close at 5,236 before the junior party's announcement. Bank shares fell up to 13 percent. Stock indexes across the rest of Europe also dropped on what was happening in Portugal, with Germany's DAX down 1 percent and Spain's IBEX off 1.6 percent.

Another indicator of investor wariness, the interest rate on Portugal's benchmark 10-year bond, jumped 0.85 percentage points to 7.31 percent. The rate, which is what Portugal would pay to borrow 10-year money, is far above the 5.23 percent rate it hit in May but still lower than the 9.77 percent it was at this time last year.

"The initial reaction of the markets shows the obvious risk that the financial credibility recently built up by Portugal could be jeopardized by the current political instability," the European Commission, the European Union's executive arm, said in a statement.

Passos Coelho, the prime minister, defied calls to resign but spent some tense hours trying to convince his coalition partners to stay the course.

If the governing coalition collapsed, the ruling party would not have enough votes in parliament to pursue the reforms required to keep accessing the international bailout loans it depends on to avoid bankruptcy.

Portugal agreed on its 78 billion euro ($102 billion) bailout program with its fellow euro countries, the European Central Bank and the International Monetary Fund two years ago when it could no longer afford to pay its way on the international debt markets. In return for the loans, and to keep debt under control, Portugal had to agree to a series of harsh cuts and reforms.

Any failure to stick to an austerity program once the loans end would exclude Portugal from the ECB's offer to buy the bonds of countries struggling with high borrowing costs. To qualify for the ECB program, the mere promise of which has already helped out Spain and Italy maintain their debts, a country must promise to reform their finances.

The country also has to keep a grip on its finances so that it is able to return to the international debt markets once the current bailout loans run out in June 2014. It aims to reduce the budget deficit from 6.4 percent last year to 5.5 percent in 2013.

If investors feel that Portugal is a risky bet and therefore charge sky-high rates to buy the country's bonds, the government will be forced to ask for another bailout loan. Worse still, it could also be forced out of the eurozone.

Though the rise in Portugal's government bond rates is not an imminent threat — since the government is not relying on bond markets but surviving on bailout loans — they reflect concerns the country will be unable to get back on its feet once the program ends.

Portugal's austerity program has already proved a massive drag on its economy, eroded standards of living and drawn criticism from trade unions and business leaders. Unemployment is at 17.6 percent, with more than 42 percent of young people out of a job.

The effects of austerity programs imposed on Portugal — and the other bailout program countries of Cyprus, Ireland and Greece — have also hit growth across the whole eurozone. The region's economy is currently in its six straight quarter of negative growth and unemployment is at 12.2 percent. This, in turn, has also slowed the global economic recovery.

Signs of hardship are all around in Portugal. Main streets are full of boarded-up stores and restaurants after the government hiked sales tax to 23 percent from 13 percent. Income tax hikes this year have cost many middle-class workers more than a month's pay. Charities report record numbers of requests for food aid, while the European Commission forecasts further declines in household income this year and next.

Unions are currently fighting the government's plans to increase the working time of state employees to 40 hours a week from 35; raise their monthly pension deductions while lowering their pension entitlements; and lay off some 50,000 government workers out of the total of about 583,000.

The crisis in Portugal was sparked by Portas' resignation Tuesday in protest against plans to continue with the tax hikes and pay and pension cuts.

The previous day, Finance Minister Vitor Gaspar walked out, saying he lacked political and public support for his austerity strategy.

Jeroen Dijsselbloem, the president of the Eurogroup meetings of eurozone finance ministers, described the Portuguese upheaval as "disturbing" and said political stability in bailed-out countries is "a crucial factor" for recovery.

Until recently, Portugal had been making progress with its bailout program. The government had successfully managed to participate in some small bond auctions and had won some breathing space on its deficit targets from its European partners. Also, the economic contraction was slowing and unemployment has stopped rising.

But the country still has a lot more unpopular cutting to do. The government has to find another 3.4 billion euros of savings in 2014 and is due to present later this month details of a deep and broad reform of how the state is run. The proposal is expected to order a further streamlining of state services and will likely fuel more protests.