Transportation stocks were among the standouts in another flat session for U.S. equities on Wednesday, and the sector's rally could be cause for optimism ahead.

Broader gains were limited as a downgrade of Portugal's credit rating weighed on banking shares, while a rate hike in China loomed as another concern for investors. However, the Nasdaq rose for its seventh straight day, extending its rally to 6.8 percent.

The Dow Jones Transportation Average <.DJT> rose 1.2 percent and hit a new closing high at 5,566.07. The gains were led by Con-Way Inc , which added 5.7 percent to $41.87 after the U.S. trucking company said it was restoring some employee benefits because the economy had improved.

Transports are considered a barometer for economic activity because shipping activity signals demand for goods. FedEx Corp advanced 1.3 percent to $96.78 while Union Pacific Corp hit an all-time high, rising 0.8 percent to $106.59.

Strength in transportation stocks goes a long way to signaling that manufacturing will continue to be robust and that the cyclical nature of the recovery is picking up steam, said Roger Volz, director of cash equities at BGC Financial in New York.

Volz added that if the sector maintained its highs, that would suggest we're working out of this current soft patch and into a new leg of economic growth.

The S&P 500 has been fluctuating in a range from about 1,250 to 1,350 for the last several months, with flare-ups in the euro-zone debt crisis often serving as a catalyst for profit-taking in a short-term trader's market.

The Dow Jones industrial average <.DJI> was up 56.15 points, or 0.45 percent, at 12,626.02. The Standard & Poor's 500 Index <.SPX> was up 1.34 points, or 0.10 percent, at 1,339.22. The Nasdaq Composite Index <.IXIC> was up 8.25 points, or 0.29 percent, at 2,834.02.

Moody's downgrade of Portugal's credit rating on Tuesday to junk cast new doubt on European efforts to rescue distressed euro-zone states without debt restructuring.

Reflecting concerns about the euro-zone debt crisis, the iShares MSCI Italy index fell 3.3 percent and the iShares MSCI Spain index lost 2.2 percent.

Banks were among the worst performers on concerns about their exposure to euro-zone debt and sluggish U.S. growth. The KBW Bank Index <.BKX> fell 0.7 percent, with Bank of America Corp , the Dow's biggest loser, down 2.4 percent at $10.74.

Gains were also limited by a softer-than-expected survey on U.S. services sector growth, which slowed slightly in June. The data gave investors little reason to make big bets after last week's rally drove the S&P 500 up 5.6 percent.

Michael McGervey, president of McGervey Wealth Management in North Canton, Ohio, said the 1,345 level was serving as resistance for the S&P 500, referring to a recent high on the index, reached at the start of June.

There's new momentum in the market following last week's surge, and generally speaking, the markets have an upward bias. But until we break through 1,345, we'll be trading sideways, he said, adding that there was further upside potential if the level was breached.

The Dow was led higher by Caterpillar Inc , which gained 1.5 percent to $110.08, and Intel Corp , up 1.4 percent at $22.75.

China's central bank increased interest rates for the third time this year on Wednesday, making clear that taming inflation is a top priority as its economy slows gently.

The Institute for Supply Management services index showed the pace of growth in the U.S. services sector dipped modestly in June, while prices paid fell sharply to the lowest level since August 2010.

Volume was extremely light, with about 5.98 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, well below last year's daily average of 8.47 billion.

About 54 percent of issues traded on the New York Stock Exchange rose, with about eight stocks advancing for every six that fell.

On the Nasdaq, 14 stocks rose for every 11 that fell. About 54 percent of the shares traded on the Nasdaq also advanced in Wednesday's session.

(Reporting by Ryan Vlastelica; Editing by Jan Paschal)