Gap Inc. said Thursday that it would separate its Old Navy brand into a publicly traded company in order to focus on its struggling namesake apparel business, sending its shares up 18 percent. 

Old Navy has had a better success than the Gap brand in recent years as a wide range of budget apparel has made it more appealing to a broader base of consumers. 

“It’s clear that Old Navy’s business model and customers have increasingly diverged from our specialty brands over time,” Gap’s Chairman Robert Fisher said. 

The company also said it planned to close 230 Gap specialty stores over the next two years. 

Gap’s overall same-store sales fell 1 percent in the fourth quarter ended Feb. 2, compared with analysts’ average estimate of a 0.3 percent rise, according to IBES data from Refinitiv. 

Gap, Athleta, Banana Republic and the remaining brands will be part of a yet-to-be-named company. The separation is expected to be completed by 2020, Gap said. 

The company’s shares were up 17.7 percent at $29.89 in extended trading.