Combined with the lapping of prior year pandemic related weakness, sales increased nearly 20% on an organic basis over prior year levels and we're positive on a two-year stack basis.
Related organic sales across this automation offering were up over 30% year-over-year in the fourth quarter with order activity remaining strong in recent months.
Combined with an accelerating demand recovery in longer and later cycle markets such as industrial OE, process flow and construction segment sales were up 8% organically on a two-year stack basis during the fourth quarter with positive trends continuing in recent months.
Combined with a leaner cost structure, our EBITDA increased over 46% year-over-year in the quarter.
SD&A expense as a percent of sales was the lowest in 10 years, and EBITDA margins are at record levels.
We ended the year with net leverage of 1.8 times, the lowest in four years, an ample liquidity heading into fiscal 2022.
Over the past two years, we deployed nearly $340 million on debt reduction, dividends, share buybacks and acquisitions during an uncertain and challenging operating environment, further highlighting the strength of our team and business model.
Consolidated sales increased 3.6% over the prior year quarter.
Acquisitions contributed 2.1 percentage points of growth and foreign currency drove a favorable 1.7% increase.
Netting these factors, sales increased 19.8% on an organic basis.
In addition, average daily sales rates increased 6% sequentially on an organic basis in the third quarter, which was approximately 600 basis points above historical third quarter to fourth quarter sequential trends.
As it relates to pricing, we estimate the overall contribution of product pricing and year-over-year sales growth, was around 80 to 100 basis points in the quarter.
The segment's average daily sales rates improved 4% sequentially from the prior quarter, which likewise was above normal seasonal patterns.
Within our Fluid Power and Flow Control segment, sales increased 26.1% over the prior year quarter with our acquisitions of ACS and Gibson Engineering contributing 6.4 points of growth.
On an organic basis segment sales increased 19.7% year-over-year and 8% on a two-year stack basis.
As highlighted on Page 8 of the deck, gross margin of 29.4% improved 63 basis points year-over-year.
During the quarter, we recognized a net LIFO benefit of $3.7 million compared to LIFO expense of $0.8 million in the prior year quarter.
The net LIFO benefit relates to year end LIFO adjustments for inventory layer liquidations and had a favorable 52 basis points year-over-year impact on gross margins during the quarter.
Selling, distribution and administrative expenses increased 13.9% year-over-year compared to adjusted levels in the prior-year period or approximately 9% on an organic constant currency basis.
Year-over-year comparisons exclude $1.5 million of non-routine expense recorded in the prior year quarter.
SD&A expense was 20.3% of sales during the quarter, down from 22% in the prior year quarter.
Our strong cost control combined with improving sales and firm gross margins resulted in EBITDA growing approximately 46% year-over-year when excluding non-routine expense in the prior year period or 39% when excluding the impact of LIFO in both periods.
In addition, EBITDA margin was 10.6% up 165 basis points over the prior year, which includes a favorable 52 basis point year-over-year impact from LIFO.
Combined with the reduced interest expense and a lower effective tax rate, reported earnings per share of $1.51 was up 89% from prior year adjusted earnings per share of $0.80.
Cash generated from operating activities during the fourth quarter was $38.3 million, while free cash flow totaled $34.6 million.
For the full year, we have generated free cash up $226 million, which represented 121% of adjusted net income.
Over the past few years, we have generated over $500 million of free cash flow.
Given the cash performance and confidence in our outlook, we deployed excess cash through share buybacks during the quarter, repurchasing 400,000 shares for approximately $40 million.
In addition, we paid down $106 million of debt during fiscal 2021, including $24 million during the fourth quarter.
We ended June with approximately $258 million of cash on hand and net leverage at 1.8 times adjusted EBITDA, below the prior level of 2.3 times and the fiscal 21 third quarter level of 1.9 times.
Our revolver remains undrawn with approximately $250 million of capacity and an additional $250 million accordion option combined with incremental capacity on our AR securitization facility and uncommitted private shelf facility, our liquidity remained strong.
For fiscal 2022, we're introducing earnings per share guidance in the range of $5 to $5.40 per share based on sales growth of 8% to 10%, including a 7% to 9% organic growth assumption, as well as EBITDA margins of 9.7% to 9.9%.
Considering our embedded customer base across our core service center network, an addressable market exceeding $70 billion and growing, we believe this initiative represents a significant opportunity that should expand our share across both legacy and emerging market verticals into fiscal 2022 and beyond.
In the interim, we're focused on achieving our financial targets of $4.5 billion in sales and 11% EBITDA margins.

Summary:
Combined with the reduced interest expense and a lower effective tax rate, reported earnings per share of $1.51 was up 89% from prior year adjusted earnings per share of $0.80.
For fiscal 2022, we're introducing earnings per share guidance in the range of $5 to $5.40 per share based on sales growth of 8% to 10%, including a 7% to 9% organic growth assumption, as well as EBITDA margins of 9.7% to 9.9%.