Strong business momentum continued during the second quarter. Rollout of 5G networks and market share gains resulted in a 5% organic sales growth in the quarter. We have adjusted our group structure to strengthen execution of our strategy to be a leading mobile infrastructure provider and to establish a focused enterprise business. Consumers, enterprises, and society will be digitalized through 5G in a way we have not seen before. With our strategy, we are in a position to capture these opportunities to enable further growth.
Technology leadership is a foundation for our growth strategy. Since 2017, our increased R&D investments have created significant value. The geopolitical situation has also required proactive investments to de-risk our supply chain and ensure that we can deliver on our strategy to gain footprint. The global supply chain situation remains challenging and inflationary pressures are strong. Combined, this results in cost increases which we work hard to mitigate as far as possible. As contracts expire, we aim to adjust pricing. However, we believe the best way to compensate for cost increases is the continued investment in technology to increase the cadence of bringing new innovative solutions to the market.
Fulfilling customer commitments under current challenging conditions, comes at a cost which dilutes gross margin. The increased costs have been largely absorbed through our investments in innovation and continuous improvements. Increased sales resulted in a gross income improvement in absolute terms of SEK 2.4 b. compared with Q2 last year, despite lower IPR revenues of SEK 0.9 b. YoY.
While 5G is the fastest scaling mobile technology, global penetration is still in an early phase. We foresee that the global 5G build-out will be larger and continue for longer than previous mobile generations. The build-out will include evolving consumer use cases, such as Fixed Wireless Access, mobile gaming and XR applications, in addition to new areas, such as enterprise and first responders.
Networks sales grew organically by 6% in Q2 underpinned by market share gains. Gross margin was 45.1% (47.9%), impacted by lower IPR revenues, increased component and logistics costs, and proactive investments in supply chain resilience, which enabled continued delivery performance in the quarter. We continue to invest in enhancing and expanding our offerings, and we increased R&D in the quarter primarily for Cloud RAN and acceleration of the next-generation Ericsson Silicon (ASICs).
Digital Services sales grew organically by 2% YoY with strong growth in cloud native 5G Core, and an EBIT of SEK -1.3 (-1.6) b. The accelerated 5G Core projects with initial deployment costs partly offset the margin improvement from increased software sales.
Managed Services sales were flat YoY with an EBIT margin of 11.2% (8.1%). With a 4Q rolling EBIT margin of 9.5%, we achieved our 2022 target two quarters ahead of plan.
The new group structure, to be reported from Q3, positions us well to execute on our strategy. Segment Cloud Software and Services is formed by merging Digital Services and Managed Services to create stronger customer propositions as our customers are moving towards 5G using cloud technologies and intelligent automation. The Digital Services business will leverage our technology leadership to accelerate customers’ transformation to cloud native networks. We are committed to turning around the business in support of the Group reaching the long-term targets.
Segment Enterprise includes Enterprise Wireless Solutions, combining Cradlepoint with Dedicated Networks to capture the growing needs for enterprise solutions. The Enterprise segment will also include the Global Network Platform, which we believe will create a paradigm shift in the industry as the full capabilities of the network will be exposed to the global developer communities and enterprises. This will inspire innovation with new opportunities for the operators to monetize network investments. The intended acquisition of Vonage is an important building block, and we are working to secure approval and close the transaction before end of July. The third element of the Enterprise segment is Technologies & New Businesses, previously within segment Emerging Business and Other.
IPR licensing revenues were affected by several expiring patent license agreements pending renewal and by 5G license negotiations in the quarter. We are confident in our strong 5G position and leading patent portfolio, positioning us well to conclude pending and future license renewals. With current contracts, revenues from IPR are estimated to be SEK 1.0–1.5 b. in Q3.
To secure deliveries we have pro-actively increased our buffer inventories. Additionally, unpredictable deliveries of components and site material led to increased inventory levels across our business. We were, however, able to partly offset the inventory increases with other working capital improvements, thereby delivering an improved free cash flow before M&A amounting to SEK 4.4 (4.1) b. Based on current visibility, we expect a gradual reduction in inventory towards the end of the year.
We continue to strengthen our governance, risk management, and compliance across the group and are fully committed to operating with integrity. We continue to engage with the Department of Justice and the Securities and Exchange Commission in relation to the 2019 Iraq investigation report and the DPA breach notices. The outcome of these matters cannot be assessed at this point in time. We are fully committed to cooperating with the US authorities.
Our strategy targets a higher growth trajectory as we aim to grow our core mobile infrastructure business and capitalize on the fast-growing enterprise market. With 5G, the world is experiencing the largest innovation platform to date, where anything that can go wireless, will go wireless. Ericsson is at the epicenter of this powerful trend, and we will continue to invest in technology leadership to ensure we capitalize on this position. EBITA margin rolling four quarters was 14% and we remain determined to reach our long-term target of an EBITA margin of 15–18% no later than in 2–3 years.