They delivered even more exceptional results on orders, which grew 29% on an underlying demand across all regions.
In addition, backlog is up 35% versus this point last year.
The second quarter offered a strong story of continuing demand recovery as revenue grew 11% organically compared to the prior year.
Utilities, our largest end market, was up 6% compared to the prior year, driven by clean water applications and continued wastewater utility OpEx demand.
Industrial was up 17% on broad-based strength as economies reopened and activity continued to ramp.
Commercial grew 12% and also improved sequentially, was by strength in the U.S. and Western Europe, while residential, our smallest end market, grew 29%.
As Patrick mentioned, the team delivered exceptional organic orders growth of 29% on strong underlying demand across all segments and regions, with particular pace in M&CS, which grew orders 70% on large water metrology contracts.
Importantly, we exit the quarter with overall backlog up 35%.
Looking at the key financial metrics, margins were above our forecasted range with EBITDA margins coming in at 17.3%.
The 200 basis points of year-over-year EBITDA margin expansion came largely from productivity, volume, and favorable mix, partially offset by inflation and investments.
Earnings per share in the quarter was $0.66, which is up 65%.
Orders were flat, but up 22%, excluding the large prior-year deal in Telangana India, order intake was robust in treatment globally.
Revenues were up 6% organically.
Orders were up 43% organically in the quarter, with particular strength in the U.S. and Western Europe.
Revenue grew 18% in the quarter with double-digit industrial demand driven by reopening activity and especially in marine and food and beverage applications.
Geographically, the U.S. was up double digits, while Western Europe contributed 27% growth on increasing industrial demand.
Emerging markets were up 24%, due in part to broad industrial recovery and momentum in China.
Segment EBITDA margin grew 200 basis points compared to the prior year the expansion came from strong volume leverage and productivity more than offsetting material and freight inflation.
Orders for the segment were up 70% organically on strong demand.
Our M&CS backlog now stands at 1.5 billion, which is a historic high and almost 50% higher than at this time last year.
We have secured more than $400 million in large contracts in the last 18 months.
Revenue was up 11%, led by 17% growth in water applications, driven by large project deployments and double-digit growth in water quality applications.
Unpacking the results by geography, emerging markets in Western Europe were up 20 and 25%, respectively.
Segment EBITDA margin in the quarter was up 460 basis points compared to the prior year.
We closed the quarter with 1.8 billion in cash and cash equivalents.
In the third quarter, $600 million of senior notes will mature to be paid with cash.
Free cash flow conversion was 172% in the quarter, in line with our expectations and historical seasonality patterns.
Net debt-to-EBITDA leverage was 1.3 times at the end of the quarter.
On operating discipline, the team did an excellent job on margins in the quarter, delivering 200 basis points of EBITDA margin expansion year on year in addition to quarter-sequential improvement.
And our customer deployments are already preventing 1.4 billion cubic meters of water from flooding communities.
Already 1 trillion gallons of water are being recycled using Xylem technology, which brings me to the topic of sustainability more broadly.
We were pleased to report, for example, that almost half of our major facilities are now operating on 100% renewable energy, helping reduce our greenhouse gas emissions intensity by more than 7% year over year.
Beyond our own footprint, our solutions have enabled our customers to reduce their carbon emissions by 700,000 metric tons last year.
For Xylem overall, we now see full year organic revenue growth in the range of 6 to 8%, up from our previous guidance range of 5 to 7%.
We also expect EBITDA margins in the range of 17.2 to 17.7%.
This guidance represents full-year margin expansion of 120 basis points at the midpoint.
That's grounded in a strong first-half performance with 300 basis points of expansion from restructuring savings on actions we took late last year, as well as volume leverage from the top line growth.
This yields an adjusted earnings per share guidance range of $2.55 to $2.70, reflecting increased confidence in our ability to lift the bottom end of the range while still managing through inflation and supply chain challenges.
That range now reflects a 28% increase in earnings per share guidance at the midpoint over last year.
We continue to expect full-year 2021 free cash flow conversion of 80 to 90% as previously guided, putting our three-year average right around 130%.
Because of the recent dip in the euro and the disproportionate effect it had on our results, we've updated our euro to dollar conversion rate assumption for the second half from 1.22 to 1.18.
This change, along with some other currency movements has a $0.04 negative impact on our second-half outlook.
Also, we are making an adjustment to our restructuring and realignment guidance from 50 to 60 million to now 30 to 40 million, while still expecting to realize similar restructuring savings due to high natural attrition and the timing of actions.
We anticipate total company organic revenues will grow in the range of 5 to 7%.
We expect third-quarter adjusted-EBITDA margin to be in the range of 16.7 to 17.2%, largely in line with our strong second quarter.

Summary:
Earnings per share in the quarter was $0.66, which is up 65%.
For Xylem overall, we now see full year organic revenue growth in the range of 6 to 8%, up from our previous guidance range of 5 to 7%.
This yields an adjusted earnings per share guidance range of $2.55 to $2.70, reflecting increased confidence in our ability to lift the bottom end of the range while still managing through inflation and supply chain challenges.