Portugal's president has accepted a compromise reached by the coalition government that allows it to stay in power, to end a weeks-old political crisis and keep an international bailout on target.

Ruling out early polls, President Anibal Cavaco Silva on Sunday said that he is opting for “the best alternative” which is “the continuation in office of the current government.”

“The coalition, which has overcome an internal rift that triggered the crisis in early July, has presented guarantees of a solid understanding on how to successfully complete the bailout programme and allow Portugal to return to full market financing,” Silva said.

The coalition almost split on July 2 when Foreign Minister Paulo Portas, the leader of the junior party, threatened to resign raising fears that Portugal would be unable to abide by the terms of its $102 billion international bailout.

The crisis had threatened to derail Lisbon's planned exit from the EU/IMF bailout, especially after talks on a broader political deal between the two coalition parties and the opposition Socialists collapsed on Friday.

But a compromise was reached within the coalition when Portas was appointed deputy to Prime Minister Pedro Passos Coelho—a move that required the president's agreement, which he gave late Sunday.

Positive move

Some observers have called the decision a positive one that would remove uncertainty among investors.

"I think it's a positive decision to calm down investors that removes uncertainty and maintains the drive of meeting the bailout goals," says Rui Barbara, an economist at Banco Carregosa.

"In the eyes of investors, Portugal should return to the situation before the political crisis,” Barbara adds.

The government has a solid majority in parliament and last week easily defeated a no-confidence motion.

The main ruling Social Democrats (PSD) has said the government will press on with meeting fiscal goals for Lisbon to exit the rescue programme by mid-2014 as planned.

The austerity measures pursued under the bailout has stoked the worst recession in Portugal since the 1970s.