Shares of Dick's Sporting Goods plunged by more than 9 percent Wednesday morning after the retailer said it sold less merchandise during the second quarter than analysts were expecting.

Sales at Dick's Sporting Goods stores open for at least 12 months also tumbled by a bigger-than-expected 4 percent during the quarter. It was partly blamed on athleisure brand Under Armour, which has been moving into more low-price retailers like Kohl's, frustrating companies like Dick's that try to sell inventory at higher price points.

Under Armour shares were also falling Wednesday morning before closing the day up less than 1 percent. Dick's shares closed the day down about 2.2 percent.

"As expected, sales were impacted by the strategic decisions we made regarding the slow growth, low margin hunt and electronics businesses, which accounted for nearly half of our comp decline," CEO Ed Stack said in a statement. "In addition, we experienced continued significant declines in Under Armour sales as a result of their decision to expand distribution."

Dick's was also one of the first businesses in the U.S. to stop selling assault rifles and high-capacity magazines, and barred the sale of guns to customers under age 21 following the February massacre at a high school in Parkland, Florida. The company had predicted this move could hurt sales but also would draw more shoppers to its stores.

Stack said Wednesday he was confident sales would turn around as those challenges lessen.

Dick's raised its profit outlook for the full year and now expects to earn $3.02 to $3.20 per share in 2018, up from a prior range of $2.92 to $3.12.

Here's what the sporting goods retailer reported for the second quarter compared with what Wall Street analysts polled by Thomson Reuters expected:

Adjusted earnings per share: $1.20 vs. $1.06 expected

Revenue: $2.18 billion vs. $2.24 billion expected

Same-store sales: down 4 percent vs. a decline of 0.6 percent expected

Shortly before the opening bell, its shares were down 9 percent.

Dick's said online sales increased 12 percent during the quarter, boosted by some of its private-label brands.

The company has been investing more in its own in-house lines, like Second Skin, which is strikingly similar to Under Armour in style and fit. It's also seen success with a line for women called Calia by Carrie Underwood.

Dick's is one of the last major bricks-and-mortar sporting goods retailers and has benefited from a wave of retail bankruptcies over the past few years, including Sports Authority and Sport Chalet.

But that doesn't mean Dick's can avoid the threat of Amazon, which has added new sportswear brands to its website this year and is working with Nike to grow its marketplace.

"While we recognize same-store sales missed expectations, [Dick's] appears to be managing its transformation to a more focused higher margin business well," Susquehanna Financial Group analyst Sam Poser said in a research note.

Shares of Dick's Sporting Goods have climbed about 24 percent so far this year, bringing the company's market cap to about $3.6 billion.