Portugal's president accepted a compromise reached by the coalition government that allows it to stay in power, defusing a potential financial crisis.
In an address to the nation, President Anibal Cavaco Silva ruled out early elections, opting for "the best alternative" - "the continuation in office of the current government".
The coalition nearly split on July 2 when Foreign Minister Paulo Portas, the leader of the junior party, threatened to resign.
A compromise was reached within the coalition when Portas was appointed deputy to Prime Minister Pedro Passos Coelho, but this step required the president's agreement, which he gave on Sunday.
The political dispute had raised fears that Portugal would be unable to abide by the terms of its €78 billion (HK$798 billion) international bailout.
Lisbon has already been forced to request a delay in the eighth review of the bailout by its creditors, originally scheduled to start last Monday, until the end of next month or early September.
As president, Cavaco Silva has the right to seek to dissolve parliament and call early elections if the government cannot govern.
But an internal rift within the coalition that triggered the crisis appears to have been resolved, and the government, which has a solid majority in parliament, last week easily defeated a no- confidence motion.
Cavaco Silva said the coalition presented him "guarantees of a solid understanding" on how to successfully complete the bailout programme.
Rui Barbara, an economist at Banco Carregosa, said: "I think it's a positive decision to calm down investors that removes uncertainty and maintains the drive of meeting the bailout goals."
Associated Press, Reuters