NEW YORK—Clothing and accessories company Rue21 has agreed to be taken private in nearly $1 billion deal with private equity firm Apax Partners.

Shares hit an all-time high Thursday.

Apax will pay $42 per share, a 23 percent premium to Rue21 Inc.'s Wednesday closing price of $34.12. The companies put the deal's total value at $1.1 billion.

Rue21 has about 23.7 million outstanding shares, according to FactSet.

The company's stock jumped $7.75, or 22.7 percent, to $41.87 in midday trading. The shares touched the offer price of $42 earlier in the session.

Rue21's board approved the transaction based on a unanimous recommendation by a special committee made up of three independent directors.

Rue21 has a 40-day "go-shop" period during which it can actively solicit parties that may be willing to present a superior bid. If Rue21 does enter a deal with another party, it would have to pay an approximately $10 million termination fee to Apax.

The transaction is not subject to a financing condition. Rue21 said that it will keep its headquarters in Warrendale, Pa., after the buyout is complete.

The acquisition is expected to close before year's end. It still needs approval from a majority of stockholders not affiliated with the SKM II funds, which own approximately 30 percent of Rue21's outstanding stock.

Rue21 also said that it anticipates fiscal first-quarter earnings of 44 cents per share. Analysts polled by FactSet predicted earnings of 48 cents per share.

Quarterly revenue rose 9.1 percent. Revenue at stores open at least a year, a key gauge of a retailer's health, fell 4.6 percent. This metric excludes results from stores recently opened or closed.

Rue21, which currently runs 932 stores in 47 states, will report its full first-quarter results on June 5.