U.S. Markets closed

US STOCKS-Wall St up on bipartisan talks, energy shares lead

(Corrects Tesoro reference in paragraph 6 to Tesoro Logistics, not Tesoro Corp)

* Republicans offer to push back default, reopen government

* Tesoro leads energy stocks after EPA change

* JP Morgan up after earnings, Wells Fargo slips

* Indexes up: Dow 0.7 pct, S&P 0.6 pct, Nasdaq 0.9 pct

By Julia Edwards

NEW YORK, Oct 11 (Reuters) - U.S. stocks rose on Friday, extending the previous day's rally, on investor hopes that a solution to end the partial government shutdown and stave off a possible U.S. default would be forthcoming.

One motivation for Friday's buyers was the chance an agreement could come over the weekend. The Senate is expected to vote over the weekend on extending the federal borrowing limit through January 2015.

"People don't want to be short going into a weekend, especially if a deal does get done," said Dennis Dick, proprietary trader at Bright Trading LLC in Las Vegas.

The partial government shutdown is now in its eleventh day and less than a week remains before an Oct. 17 deadline to extend the government's borrowing authority and avoid a debt default.

All S&P sectors were up except consumer staples, which was only slightly down. Energy stocks led the S&P 500, up 1.1 percent after the Environmental Protection Agency proposed lowering the required amount of ethanol to be blended into U.S. gasoline after Thursday's market close on Thursday.

Among individual stocks, Tesoro Logistics LP shares were down 1.6 percent at $54.77 after regulators said initial investigations following a 20,600-barrel leak on Tesoro Logistics' pipeline in North Dakota point to corrosion on the 20-year-old pipeline.

JP Morgan Chase & Co, the biggest U.S. bank by assets, reported a rare quarterly loss after incurring $9.2 billion in legal expenses. Shares of the stock were higher, rising 0.6 percent to $52.83.

"If you peel back the onion, J.P. Morgan at the base of this is operating quite well, which comforts investors," said Jeff Morris, head of U.S. equities at Standard Life Investments in Boston.

The Dow Jones industrial average was up 87.24 points, or 0.58 percent, at 15,213.31. The Standard & Poor's 500 Index was up 9.23 points, or 0.55 percent, at 1,701.79. The Nasdaq Composite Index was up 28.64 points, or 0.76 percent, at 3,789.39.

Wells Fargo & Co, the biggest U.S. mortgage lender, reported a 13 percent rise in third-quarter profit, but its mortgage banking income fell sharply as the refinancing boom began to fade. Wells Fargo was down at 0.07 percent to $41.41.

Retail apparel chain Gap was down 2.7 percent to $36.74 a day after reporting net sales were flat compared with last year.

The Thomson Reuters/University of Michigan index of consumer sentiment fell in October to its weakest in nine months and was below expectations. (Editing by Bernadette Baum and Kenneth Barry)