Discount store operator Dollar General raised its full-year profit forecast on Thursday after reporting its best quarterly same-store sales rise in nearly five years, benefiting from a wider selection of products and revamped stores.

Shares of the company rose about 5% in premarket trading as the retailer raised its adjusted profit for fiscal 2019 to the range of $6.55 to $6.65 per share from $6.45 to $6.60.

The retailer has been aggressively opening hundreds of new stores, creating private label and adding food, health and beauty products to its existing outlets as it tries to better compete with other retailers and grocers.

The efforts boosted same-store sales growth to 4.6% in the third quarter ended Nov. 1, above the average analyst estimate of 3.34% increase, according to IBES data from Refinitiv.

The company now expects full-year same-store sales to grow in the mid-to-high 3% range compared with the prior low-to-mid 3% range.

The upbeat forecast comes in contrast to rival Dollar Tree Inc, which cut its full-year profit forecast last month, as the discount retailer fell short in its efforts to counter the impact of latest U.S. tariffs on Chinese imports.

Dollar General's net sales rose 8.9% to $6.99 billion in the quarter, above the estimate of $6.92 billion.

Net income rose to $365.6 million, or $1.42 per share, from $334.1 million, or $1.26 per share, a year earlier.

Analysts on average had expected a profit of $1.38 per share.