Image source: Getty Images.

Mexico-focused silver miner First Majestic Silver (AG -0.49%) recently reported an excellent third quarter. Some of the numbers were absolutely stunning. For example, mine operating earnings rocketed 656% to $20 million, and net earnings ballooned 556% to $8.1 million. While a 30% increase in the realized silver price certainly helped, two other numbers shined through during the quarter, leading to this strong showing.

1. Silver equivalent production: up 27%

One of the reasons First Majestic Silver could cash in on higher silver prices during the quarter was a 27% surge in production, which totaled 4.5 million ounces of silver equivalent during the quarter. Meanwhile, total silver production jumped 20% to a new quarterly record of 3.1 million ounces. The primary driver of this growth was the addition of the Santa Elena mine, which the company acquired last October.

For First Majestic Silver, that production growth came at the perfect time, because precious metal prices were at their peak during the quarter:

New York Silver Price Chart

New York Silver Price data by YCharts.

Because of that, the miner captured both rising prices and rising volumes at the same time, which fueled remarkable earnings growth during the quarter.

Companies that were able to deliver peak production at peak pricing did very well during the third quarter, while those that could not were a big disappointment. Precious metal streaming giant Silver Wheaton (WPM 0.96%) actually fell in both categories. The company saw its gold sales volume rocket 77% to a new quarterly record of 85,100 ounces during the quarter thanks to a recent acquisition. That enabled the company to cash in on rising gold prices to deliver an 187% increase in net earnings. That said, Silver Wheaton's silver sales lagged because of issues at two of its partners' mines and were down 7%. Because of that, Silver Wheaton could not cash in on the fact that the price of silver was at its highest point in the past 10 quarters to the same degree as First Majestic, which delivered record silver production during the quarter. That proved to be a big disappointment for Silver Wheaton investors, who sold off the stock. 

2. All-in sustaining costs: down 27%

As if the dual fuels of rising production and prices were not enough, First Majestic also pushed its all-in sustaining costs down by 27% year over year to just $10.52 per silver ounce. Three factors contributed to this decline: the company's recently renegotiated smelting and refining agreements, the continued weakness in the Mexican peso, and its record silver production. Those new arrangements alone resulted in a 34% decrease in smelting and refining costs, helping the company to more than offset a 10% increase in electric costs from the national power grid.

In addition to that, the company also captured a 33% year-over-year drop in cash costs, which fell to $5.84 per ounce of silver after accounting for by-product credits. Aside from the weaker peso, the company benefited from its ongoing efforts to reduce costs and focus on producing its most profitable ounces. Further, the addition of Santa Elena, which had negative cash costs of $0.81 per ounce, also helped keep a lid on overall costs, enabling the company to capture very wide margins during the quarter.

Investor takeaway

While rising silver and gold prices got most of the attention last quarter, investors cannot overlook the positive impact of First Majestic's surging production and falling costs. Those two factors enabled the company to take full advantage of peak pricing during the quarter. Further, they will be a key to the company's ability to continue thriving at weaker prices, which, thus far, have been the story of the fourth quarter.