Sunoco LP, the retail fuel-marketing remnant of the former Philadelphia oil company, announced Thursday that it is selling most of its convenience stores to 7-Eleven for $3.3 billion to allow it to focus more on its wholesale fuel-supply business.

The nation's largest convenience-store operator, 7-Eleven Inc. will get about 1,110 stores in the deal, mostly along the East Coast and in Texas.

The deal does not include Sunoco's APlus brand name, which will remain on franchisee-run stores. About 5,500 Sunoco retail outlets owned by third parties or franchisees also will continue to market the company's branded fuel, which is promoted extensively through sponsorship affiliations with motor-racing organizations such as NASCAR, IndyCar and the National Hot Rod Association.

Sunoco LP, which was sold to Energy Transfer Partners in 2012 and moved its headquarters to Dallas in 2015, will enter into a 15-year take-or-pay fuel-supply agreement with 7-Eleven, under which Sunoco will supply about 2.2 billion gallons of fuel a year.

For the first four years, 7-Eleven will be committed to increase that amount by 500 million gallons a year, said Robert W. Owens, Sunoco's chief executive.

The agreement provides that 7-Eleven will continue to use the Sunoco brand at currently branded Sunoco stores. As part of the deal, 7-Eleven also is buying the Laredo Taco restaurant brand and the Stripes convenience-store brand from Sunoco. The Stripes brand is likely to be subsumed into the much bigger 7-Eleven.

Investors welcomed the news. Sunoco's partnership units, which trade under the ticker SUN, closed up $4.86 or 20.4 percent Thursday on the New York Stock Exchange, to $28.69.

Sunoco said proceeds from the sale will help it reduce debt and allow it to refocus on building a national distribution system of Sunoco-branded fuel, though it will largely exit the business of operating retail fuel outlets.

"The sale of these retail assets to 7-Eleven is the beginning of an exciting evolution for SUN into a premier nationwide fuel supplier," Owens said in a statement. "Our supply agreement with 7-Eleven provides SUN with a predictable long-term income stream, and this transaction quickly allows SUN to improve its financial profile."

Sunoco will separately sell about 200 convenience stores in Texas, New Mexico and Oklahoma. It will retain its  Aloha Petroleum unit in Hawaii.

After the sale, Sunoco said about 29 percent of its wholesale fuel business will be to 7-Eleven outlets, 25 percent to Sunoco dealers, 13 percent to commercial fuel buyers, and 31 percent to distributors of Sunoco and other branded fuels such as Chevron, Exxon, and Valero.

Sunoco retains a one-third ownership in its former South Philadelphia refinery complex, Philadelphia Energy Solutions, which is controlled and operated by the Carlyle Group. Sunoco also retains the racing-fuel production unit at its former refinery in Marcus Hook, and an ethanol plant in Fulton, N.Y.

The deal with 7-Eleven is expected to close by the fourth quarter.

Also based in Dallas, 7-Eleven Inc. is owned by Seven & i Holdings Co. Ltd. of Japan.  The company said the Sunoco acquisition will allow its 7-Eleven subsidiary to "expand its store network and offer greater convenience, while also improving profitability."

In the United States and Canada, 7-Eleven owns 8,707 stores. It operates, franchises or licenses more than 62,000 stores in 17 countries, including 10,900 in North  America.

The sale of the retail Sunoco fuel outlets is the latest divestiture of the Sunoco network, a former integrated oil company founded by Philadelphia's Pew family that explored for oil, refined petroleum, produced chemicals and coke, pioneered oil-sands development, and built and operated a fleet of vessels.

Its former pipeline subsidiary, Sunoco Logistics Partners LP, which is based in Newtown Square, is currently merging with its parent company, ETP, after which Sunoco Logistics' operations will be absorbed into the Texas company.