What happened

Shares of First Majestic Silver (NYSE:AG) rallied as much as 10.9% by 1:00 p.m. EDT on Wednesday. Driving up the silver mining company's stock were its second-quarter results.

So what

First Majestic Silver posted in-line numbers for the second quarter as its adjusted loss of $0.02 per share matched the consensus estimate. While its silver-equivalent output jumped 25% to 6.4 million ounces, lower silver prices more than offset its strong production results.

Silver bars and coins.

Image source: Getty Images.

The miner's quarter, however, had several silver linings. The company's costs, for example, declined by 10%, which enabled it to generate $0.09 per share in cash flow.

The company also took steps to further improve its margins and profitability by deciding to temporarily suspend mining operations at La Parrilla toward the end of the year. This move will negatively impact output, since La Parrilla contributed 7% of total production during the first half. However, the mine had struggled to make a profit due to low silver and lead prices. First Majestic plans to revitalize its exploration program so that it can build enough reserves to potentially restart the mine by early 2021.

Now what

While silver prices were weaker during the second quarter, they've been red hot in recent months. That's helped fuel a big-time rally in the shares of silver miners like First Majestic, which is now up 82% for the year after today's surge. That rally could continue if silver remains hot, though the stock could easily give back those gains if it cools off. With that in mind, it's not quite as compelling as it was to start the year.