Back from the brink in Portugal, but risks loom By Shrikesh Laxmidas LISBON (Reuters) - Portugal's coalition partners healed a perilous internal rift with a cabinet reshuffle that offers temporary stability, but the result is still likely to test Lisbon's relations with its international lenders. Prime Minister Pedro Passos Coelho promoted Paulo Portas, the head of the junior coalition party CDS-PP, to be his deputy on Saturday, hoping to end a rift that threatened to bring down the government and endanger the country's bailout. The rift was all about the austerity that Portugal is being forced to carry out in exchange for its bailout from the troika of European Union, International Monetary Fund and European Central Bank. Vitor Gaspar, who was an architect of the cutbacks, quit because he did not detect enough support for them. Passos Coelho appointed Maria Luis de Albuquerque, a supporter of austerity, to replace him. Portas, a critic of cuts, then quit as foreign minister in protest. Portuguese bonds sold off sharply last week on fears Lisbon would be unable to exit its bailout as planned in June 2014. They have since settled as the government's immediate collapse was been averted. Portas, the austerity critic, however, will become the most powerful member of the cabinet, taking on coordination of economic policy-making and bailout negotiations with the troika. It doesn't suggest an easy ride. "The new government - a solution to the political crisis without a snap election - is a necessary condition, but is very far from being enough for us to avoid the precipice," business daily newspaper Diario Economico said in an editorial on Monday. The deal, which is widely expected to be approved by President Anibal Cavaco Silva this week, should buy the government some time but its challenges will pile up rapidly and analysts say government instability could return any time. The first test for the new cabinet, and especially Portas, will be the next quarterly review of the adjustment program under Portugal's 78-billion-euro bailout, with the troika's team set to land in Lisbon on July 15. Antonio Barroso, a London-based political analyst at advisory firm Teneo Intelligence, said relations with the troika are set to become complicated and efforts at reform are likely to weaken. "It is likely that Portas will be looking to (make) quick gains in his new position, and thus he might soon demand a big revision of deficit targets for next year," Barroso said in a research note. This will in turn make negotiations over program exit more difficult. The country has already resorted to one-off measures to meet budget goals and just in March the troika agreed to relax this year's targets. Portas' party voted for this year's budget in parliament, which approved massive tax increases, but he said it had done so once more to avert a political crisis. In May he criticized a proposal for a special levy on pensions, saying "it is a frontier I cannot allow to be crossed." Pressures to ease up on reforms, meanwhile, could be accelerated by local elections due at the end of September. There is a backdrop of rising social protest and the worst economic slump in Portugal since the 1970s. Next year's budget, to be presented to parliament by October 15 will pose yet another hurdle. After a week of resignations, tough negotiations and u-turns, however, there are other flashpoints within the coalition government itself that may be the most likely source of uncertainty. Most centre on Portas. A defense minister in two previous coalition governments, he has no direct experience of economic policy-making. He is widely seen as a political survivor and a populist who refreshed his party's image after rising to its top in 1998. But how he gets on with de Albuquerque - who is seen by analysts as a technocrat lacking political clout - is uncertain. She has been praised by European officials, not least for her efforts to bring Portugal back to debt markets. But Portas did resign because of her appointment. And then there is the role of Passos Coelho. It's a clear tactical victory by the smaller partner. In less than a week a resigning minister has in practice become the operational head of the government, with power over key areas at this stage," said Viriato Soromenho Marques a political scientist at the University of Lisbon. Uncertainty surrounding the capacity of the government to continue in its new form could linger because of the large concessions made by the premier. Gilles Moec, an economist at Deutsche Bank, said in research note that "Passos Coelho had to pay a high political price" to secure the coalition's survival. "While the market may salute as a first step lesser uncertainty over the country's political stability, looking ahead we think that this arrangement could create some problems," Moec said. Additional reporting by Daniel Alvarenga, editing by Axel Bugge/Jeremy Gaunt