Strong demand for firearms helped Smith & Wesson Holding Corp post a quarterly profit that topped market expectations, and the company forecast solid second-quarter revenue, sending its shares up 12 percent.

For the first quarter ended July 31, the 157-year-old U.S. firearms maker earned $12.6 million, or 21 cents per share, compared with $2.3 million, or 5 cents per share, a year ago.

Revenue rose 30 percent to $102.2 million.

Analysts, on average, were expecting the Springfield, Massachusetts-based company to earn 10 cents a share, on revenue of $94.1 million, according to Reuters Estimates.

Firearms backlog was $177.5 million at the end of the first quarter, the company said, adding that cancellations reduced backlog by about 10 percent during the period.

The company expects second-quarter revenue between $103 million and $105 million, with firearms contributing $88 million to $90 million.

Analysts were looking for revenue of $97.7 million for the second quarter.

Shares of the company were up at $6.30 in trading after the bell. They closed at $5.61 Wednesday on Nasdaq.

(Reporting by Nivedita Bhattacharjee in Bangalore; Editing by Deepak Kannan)