PANAMA CITY/NEW YORK, May 25 (Reuters) - Panama won a second investment-grade rating on its debt on Tuesday, rewarding the Central American country for years of rapid economic growth, trim budgets and tax system overhauls. S&P hiked Panama one notch to BBB-minus from BB-plus and said the outlook for the credit rating is stable. The upgrade, a victory for conservative President Ricardo Martinelli, came as some Southern European countries struggle with debt problems and could attract more investment to Panama. A tiny nation best known for its transoceanic canal and a banking industry criticized for asking too few questions of depositors, Panama joined Brazil, Mexico and Chile in the investment-grade club when Fitch ratings upgraded its debt to BBB-minus in March. "The upgrade reflects our assessment that continued economic growth -- combined with moderate fiscal deficits -- should reduce the government's debt burden," S&P said. Panama's Deputy Economy Minister Frank De Lima said ratings agencies responded favorably to tax hikes and fiscal discipline under Martinelli, who took office last July. "Our policy has also been to strengthen our own domestic market, issuing notes, letters in Panama to diversify our debt ratio between external and internal debt," De Lima told Reuters, noting Panamanian debt has been 90 percent external. "We want to change that ratio and have a more diversified debt profile. That's something that the ratings agencies also have viewed very positively," he added. Panama, which uses the U.S. dollar as its currency and straddles a narrow strip between the Atlantic and Pacific oceans, has been a big winner from the growth in global trade. About 4 percent of international commerce flows through the Panama Canal, and the country also ships goods by rail from ports on one coast to another. Shipping prowess helped Panama average 8 percent annual growth between 2000-09 -- the fastest pace in Latin America. Panama's economy even grew during the global recession and a $5.25 billion project under way to expand the canal bodes well for future growth. "The ongoing expansion of the Panama Canal, an ambitious public infrastructure investment plan and an expanding services sector that benefits from the country's emerging role as a regional hub for trade, finance and transportation will support Panama's growing economic resilience and diversification," said S&P. Moody's Investors Service rates Panama one notch below in speculative territory at Ba1. It said in February the country was on review for a possible upgrade. "Moody's upgrade to investment grade now looks more like a formality," said RBS economist Boris Segura. S&P said it expects Panama's economy to grow at an average rate of 5 percent between 2010 and 2015 versus an average of 8 percent between 2004 and 2009. The expansion of the Panama Canal zone will create a steady increase in revenue while tax reform and more efficient tax administration should provide ample resources to fund its investment plans without eroding fiscal flexibility or reversing the decline in its debt burden, S&P said. The general government deficit is forecast to drop to 1.4 percent of GDP for 2010 and then drift to around 1.2 percent in the period between 2011 and 2015, S&P said. After running a deficit equivalent to 4.9 percent of GDP in 2004, Panama ran surpluses between 2006-08. Last year, when growth slowed, it went into the red for 1 percent of GDP.