Direct costs of contract revenue. Direct costs of consolidated contract revenue increased $13.7 million, or 22.4%, for the three months ended March 29, 2024, compared to the three months ended March 31, 2023, primarily as a result of the increase, and change of mix, in contract revenues as described above. As a percentage of contract revenue, direct salaries and wages decreased to 17.6% in the three months ended March 29, 2024 from 19.9% in the three months ended March 31, 2023, while subcontractor services and other direct costs increased to 43.7% in the three months ended March 29, 2024 from 39.9% in the three months ended March 31, 2023.
Direct costs of contract revenue in our Energy segment increased $12.9 million, or 24.7%, for the three months ended March 29, 2024, compared to the three months ended March 31, 2023. Direct costs of contract revenue for the Engineering and Consulting segment increased $0.8 million, or 9.7%, in the three months ended March 29, 2024, compared to the three months ended March 31, 2023.
Subcontractor services and other direct costs increased by $12.6 million, or 30.9%, in the three months ended March 29, 2024, compared to the three months ended March 31, 2023, primarily due to the increase in construction management revenues, which utilize a higher percentage of material cost and installation subcontracting. Salaries and wages increased by $1.1 million, or 5.4%, in the three months ended March 29, 2024, compared to the three months ended March 31, 2023, primarily as a result of the increases in contract revenue as described above.
Gross Profit. Gross profit increased 14.9% to $47.4 million, or 38.7% gross margin, for the three months ended March 29, 2024, compared to gross profit of $41.3 million, or 40.2% gross margin, for the three months ended March 31, 2023. The decrease in our gross margin was primarily driven by changes in the mix of revenues as described above.
General and administrative expenses. General and administrative (“G&A”) expenses increased $4.8 million, or 12.9%, in the three months ended March 29, 2024, compared to the three months ended March 31, 2023. G&A expenses consisted of an increase of $3.2 million in the Energy segment combined with an increase of $1.8 million in the Engineering and Consulting segment, partially offset by a decrease of $0.2 million in unallocated corporate expenses.
Within G&A expenses, the increase of $4.1 million in salaries and wages, payroll taxes and employee benefits, combined with the increase of $1.3 million in other general and administrative expenses was partially offset by a decrease of $0.6 million in depreciation and amortization. The increase in salaries and wages, payroll taxes and employee benefits was primarily due to an increase in incentive compensation, consistent with the improvement in operating profit, and higher fringe benefit costs. The increase in other general and administrative expenses was primarily due to increased professional service fees and computer-related expenses. The decrease in depreciation and amortization was primarily related to lower amortization of intangible assets from prior acquisitions.
Income (loss) from operations. Operating income increased 33.6% to $5.4 million for the three months ended March 29, 2024, compared to an operating income of $4.0 million for the three months ended March 31, 2023, as a result of the factors noted above.
Total other expense, net. Total other expense, net, decreased $0.9 million, or 38.4%, for the three months ended March 29, 2024, compared to the three months ended March 31, 2023, primarily due to increased interest income related to our higher cash balances, combined with lower interest expense resulting from the reduced interest rate margin under our credit facilities.
Income tax expense (benefit). We recorded an income tax expense of $1.0 million for the three months ended March 29, 2024, an effective tax rate of 25.1% on income before income tax expense, compared to an income tax expense of $0.8 million for the three months ended March 31, 2023, an effective tax rate of 44.8% on income before tax expense. The reduction in the effective tax rate resulted from increases in discrete items related to stock compensation deductions.