Smith & Wesson (SWHC) said Tuesday its net income for the third quarter surged 42.6%, as the gun maker benefited from heftier margins and stronger demand for firearms.

The company reported a profit of $20.8 million, or 36 cents a share, compared to $14.6 million, or 22 cents a share, in the same period a year earlier. Earnings from continuing operations increased 14.6% to $20.1 million, or 35 cents a share.

Revenue rose 7.1% to $145.9 million. Gross margin widened to 40.2% versus 36.6% a year earlier.

Analysts expected per-share earnings of 29 cents on revenue of $142.7 million. Smith & Wesson forecasted earnings from continuing operations of 28 to 30 cents a share and between $140 million and $145 million in revenue.

Gun makers like Smith & Wesson widely reported a surge in sales last year, as the threat of additional regulations drove buyers to purchase firearms. In recent months, analysts have warned that demand will likely flatten.

Last month, rival Sturm, Ruger & Co. (RGR) logged a 28.3% increase in sales during its fiscal fourth quarter, although outdoor retailer Cabela’s (CAB) recently saw a smaller boost from gun sales.

Smith & Wesson said third-quarter revenue got a big lift from handgun sales, which grew 29.9% year-over-year amid demand for the company’s M&P pistols. CEO James Debney called the result “a solid result when we consider that the year-ago quarter reflected a surge in consumer demand.”

Excluding Walther products in the year-ago period, total sales were up 16.7%. Smith & Wesson phased out a distribution agreement with the German gun manufacturer last year.

Also on Tuesday, Smith & Wesson raised its full-year guidance to between $615 million and $620 million in sales and earnings from continuing operations of $1.39 to $1.42 a share. The Springfield, Mass.-based company expects to book per-share earnings of 37 to 40 cents and revenue of $159 million to $164 million.

In January, Smith & Wesson announced it will no longer sell many of its handguns in California, where a new law mandates the use of microstamping technology. The company said sales of California-compliant guns, including revolvers and handguns that were launched prior to the law taking effect, will more than offset any lost sales.

Shares of Smith & Wesson jumped 6.6% to $12.58 in after-hours trading. Through Tuesday’s close, the stock was down 12.5% since the start of the year.

Follow Matthew Rocco on Twitter @MatthewRocco