Sept 6 (Reuters) - Wall Street climbed on Wednesday, fueled by energy and financial shares and helped by news of an agreement to extend the debt limit, as stocks bounced back modestly from a day-earlier selloff.

U.S. stocks added to moderate gains as President Donald Trump, siding with Democrats over his fellow Republicans, said he agreed to pass an extension of the U.S. debt limit until Dec. 15, potentially avoiding an unprecedented default on U.S. government debt.

Data showed U.S. services sector activity accelerated in August amid strong gains in new orders and employment, while another report showed only a modest rise in the trade deficit in July - the latest signs that the economy had gathered momentum early in the third quarter.

A Federal Reserve survey showed the U.S. economy expanded at a modest to moderate pace in July through mid-August.

The S&P 500 on Tuesday had suffered its biggest single-day decline in nearly three weeks amid fresh tensions involving North Korea and a second powerful hurricane bearing down on the U.S. south.

“You have opposing forces kind of keeping the market from breaking out to a new high, but yet the fundamental data seem to be keeping it from breaking down and selling off significantly,” said Walter Todd, chief investment officer of Greenwood Capital in Greenwood, South Carolina.

“You kind of have these opposing forces pushing on each other and keeping the market in a very narrow range,” Todd said.

The Dow Jones Industrial Average rose 84.25 points, or 0.39 percent, to 21,837.56, the S&P 500 gained 10.19 points, or 0.41 percent, to 2,468.04 and the Nasdaq Composite added 25.51 points, or 0.4 percent, to 6,401.08.

The energy sector rose 1.7 percent, on track for its biggest single-day gain in two months, as oil prices rose. Strong global refining margins and the reopening of U.S. Gulf Coast refineries provided a more bullish outlook after sharp drops due to Hurricane Harvey.

Gains for oil majors Exxon Mobil and Chevron supported the S&P 500 and the Dow.

Financials climbed 0.6 percent a day after their largest one-day drop since mid May.

Investors were digesting news that Fed Vice Chair Stanley Fischer said he would step down from his position in mid-October, potentially accelerating Trump’s opportunity to reshape the direction of the central bank.

AT&T and Verizon shares were each off more than 1 percent, dragging on the S&P. Rival T-Mobile US said it will offer a free subscription to video streaming service Netflix with its unlimited data family plans.