Gross profit decreased by $3.9 million, or 1%, for the second fiscal quarter compared to the prior year period. The $74.1 million decrease in revenue was partially offset by a decrease of $70.2 million in cost of product as compared to the prior year period. Our wholesale sales price per gallon partially correlates to the change in the wholesale market price of propane. The wholesale market price at our two major supply points averaged 10.1% and 15.0% less in the second fiscal quarter of 2024 compared to the prior year period. These decreases impacted both the revenue and cost of product changes for the period. As expected, propane market cost reduction and stabilization impacted our current period gross profit. Margin per gallon was $1.26 per gallon and $1.21 per gallon for the second fiscal quarter of fiscal 2024 and 2023, respectively. Operating income per gallon was $0.46 per gallon and $0.44 per gallon for the second fiscal quarter of fiscal 2024 and 2023, respectively.
Gallons sold for the second fiscal quarter of 2024 decreased 13.6 million, or 5%, primarily due to customer attrition related to the impact of continued inflationary conditions across the nation and warmer weather during the quarter as compared to the prior year period.
We recognized net earnings attributable to Ferrellgas Partners, L.P. of $95.8 million and $98.1 million in the second fiscal quarter of fiscal 2024 and 2023, respectively. Operating expense as a percentage of total revenue increased 13% for the second fiscal quarter compared to the prior year period. Operating expense – personnel, vehicle, plant and office increased $2.3 million, or 1%. Lower legal costs compared to the prior year period drove the majority of the $5.9 million decrease in General and administrative expense, partially offset by costs related to the technology investments described above.
Adjusted EBITDA, a non-GAAP financial measure, decreased by $9.0 million, or 6%, to $146.9 million in the second fiscal quarter compared to $155.9 million in the prior year quarter. The change was primarily due to a $3.9 million decrease in gross profit and, after adjusting for a $9.0 million decrease in Legal fees and settlements related to non-core businesses, a $5.4 million increase in Operating, general and administrative expense.
In conjunction with our focus on growth, we acquired Eastern Sierra Propane in January 2024 with seller advising support from Matrix Capital Markets Group, Inc. This additional 150-mile service area in the Eastern Sierra mountains was cultivated by owner Tom Sigler over 30 years and complements our existing California service units. The strategic propane gas storage acquired through the sale will benefit our distribution network.
Technology remains a strategic priority as we advance various business initiatives such as the design and implementation of the ERP system noted above. Our digital welcome package and tank monitoring installations are other customer service enhancements. As a nationwide logistics company, we will benefit from having better data, miles and minutes management and pricing tools which in turn will allow us to deliver product to our customers timely and efficiently.
Blue Rhino celebrated its 30th birthday this year. A special edition tank sleeve is rolling out nationally to commemorate the occasion. Blue Rhino fans have the opportunity to enter a nationwide sweepstakes to become an honorary Chief Grilling Officer and receive a BBQ master class for up to 30 friends. Grilling enthusiasts can also view favorite grilling recipes on our 30th anniversary e-cookbook in addition to participating in other events.
On Friday, March 8, 2024, the Company will conduct a teleconference at https://edge.media-server.com/mmc/p/5po8ehpw to discuss the results of operations for the second fiscal quarter ended January 31, 2024. The webcast of the teleconference will begin at 8:30 a.m. Central Time (9:30 a.m. Eastern Time). Questions may be submitted via the investor relations e-mail box at InvestorRelations@ferrellgas.com.