Shares of discount retail chain Dollar General (DG - Get Report)  surged on Thursday after the company posted fiscal second-quarter earnings and sales that surpassed analysts' forecasts and raised its guidance as consumers continued to scoop up thriftier-priced items off its store shelves.

The Goodlettsville, Tenn.-based company posted net income of $426.6 million, or $1.65 a share, vs. $407.2 million, or $1.52 a share, in the comparable year-ago quarter. Analysts polled by FactSet had been expecting earnings of $1.57 a share.

Net sales came in at $6.98 billion, up more than 8% from the same period last year and above analysts' forecasts of $6.9 billion. Same-store sales, a key metric in retail measuring store-by-store sales performance, gained 4%.

Just a few things left to get for Back to School? Finish your list with this $5 off $15 digital coupon from DG. https://t.co/o5hbGIle7J pic.twitter.com/wiJnyrjUtX

— Dollar General (@DollarGeneral) August 28, 2019

Despite rising tariffs on goods Dollar General imports from China, the company increased its full-year fiscal 2019 guidance, saying it now expects sales growth of 8% vs. previous guidance of 7%, and same-store sales growth in the low-to-mid 3% range, compared to previous expectations of approximately 2.5%.

The company also said it expects adjusted per-share earnings of between $6.45 and $6.60, in line with analysts' current expectations of $6.57 a share.

Shares of Dollar General jumped nearly 9% to $153.67 in trading on Thursday. 

Save 57% With Our Labor Day Sale. Join Jim Cramer's Action Alerts PLUS investment club to become a smarter investor! Click here to sign up!