Select Comfort Corp.’s profit fell 14 percent in the second quarter, but that performance was enough to beat investors’ expectations for the first time since 2012.

The company's shares rose 8.5 percent in early Thursday in their first trades since the news.

The Plymouth-based maker and seller of air-filled beds said Wednesday that it earned $8.5 million for the quarter ended June 28. That amounted to 16 cents a share — above analysts’ forecast of 14 cents.

Sales rose 13 percent to $235 million, also above analysts’ forecast of $219 million. The company’s results prompted several congratulations from Wall Street analysts during a conference call with CEO Shelly Ibach late Wednesday afternoon. It marked the first time since the third quarter of 2012 that Select beat expectations.

“Congratulations on a good quarter,” said Bradley Thomas with KeyBanc Capital. “This was the best quarter for sales in well over a year.”

Raymond James analyst Budd Bugatch said: “It’s very nice to see positive numbers” after several difficult quarters.

The company has struggled with faulty or expensive ad campaigns and store-expansion expenses that grew faster than expected. It cited higher sales, marketing and administrative expense for its profit drop in the latest period. The company also said unit sales declined during the second quarter in part because the company discontinued the limited “classic” edition bed that was offered over Memorial Day in 2013. It also said its advertising costs are expected to climb during the second half of the year.

During the most recent quarter, Select Comfort said capital expenditures rose $3 million, to $40 million, as it continued to roll out new and renovated stores. The company now has about 40 percent of its stores in “non-mall” venues, Ibach said. That percentage is expected to grow to about 50 percent in a year. The company will add 20 to 30 net new stores during 2014, which should give it a total of 460 to 470 stores nationwide.

Ibach told analysts that the company expects to spend $70 million to $80 million on capital expenditures for full-year 2014. About half of that will be related to systems infrastructure while another third will be related to market development. The remainder will be devoted to product innovations and other initiatives.

Select Comfort also reiterated its 2014 full-year earnings outlook of $1.07 a share.