The first six months of 2017 proved the middle market’s most productive first half in 10 years. Activity was fueled by: confidence in the overall economy, including a widely-held expectation of lower taxes and fewer regulations in the future; underlying conditions favorable to M&A, such as an aging population of baby-boomer owners looking to sell their companies and the proliferation of technology in all industries; and investor enthusiasm for private equity as an asset class, which is fueling fundraising.

Deals completed in the period totaled 5,260, according to data from Thomson Reuters. That represents a 12 percent increase over the 4,694 deals that closed in the first six months of 2016. And it marks the strongest first six months of the year since pre-recession 2007, when 5,478 middle-market deals closed.

Private equity is experiencing the best fundraising climate in years - perhaps ever. In the first half of the year, 224 North America-focused funds closed, raising $133 billion, while globally there have been 412 private equity funds closed, which raised a combined $221.4 billion, surpassing slightly the record $220.8 billion raised in 2008, according to Preqin.

PE firms with proven track records are faring especially well, raising funds in record time. For example, Platte River Equity, a Denver-based firm that backs lower middle-market companies, began fundraising for its fourth fund in March and closed the $625 million fund in June.

Technology is one sector fueling M&A activity. Transactions announced recently that demonstrate the momentum in tech include the $13.7 billion purchase of Whole Foods by Amazon.com Inc. (Nasdaq: AMZN), which is expected to trigger an explosion of M&A in grocery stores, delivery services and related businesses.

Private equity interest in tech is very high. In June, Hollie Moore Haynes, a former partner at Silver Lake Partners, closed the debut fund for her Luminate Capital Partners at $265 million. Backing companies benefitting from technology is no longer reserved for only tech PE firms. “Many firms that are not considered ‘tech shops’ in the usual sense are making significant investments in later-stage technology companies; however, these are seen as technology-enabled businesses serving traditional markets, rather than pure-play technology companies,” says Rich Lawson, the CEO of tech-focused PE firm HGGC, which closed its third fund in December. Dealmaking in tech is expected to soar over the next 12 months, according to Mergers & Acquisitions’ Mid-Market Pulse (MMP).

The momentum in the middle market looks likely to continue. June marked the 13th consecutive month of expansion, according to Mergers & Acquisitions’ M&A Conditions Index (MACI).

Editor’s Note: To measure activity in the middle market, Mergers & Acquisitions looks at transactions that fulfill several requirements: Deals must have a value of roughly $1 billion or less, or an undisclosed value; they must be completed (not just announced) within the timeframe designated; and they must include at least one U.S. company in the role of buyer and/or seller. Excluded from our charts are: recapitalizations; self-tenders; exchange offers; repurchases; stake purchases; and transactions with undisclosed buyers or sellers. Except where noted, our data provider is Thomson Reuters, which updates its databases continuously. We use the data available at press time. For this article, data was collected on July 3, 2017.