Publicly traded real-estate investors in the U.S. enjoyed a record-breaking year for mergers in 2021, but the war in Ukraine and soaring inflation threaten to slow that deal making in the second half of the year.

Real-estate investment trust mergers and acquisitions as well as stock mergers totaled $140 billion last year, an all-time high, according to Jones Lang LaSalle, a professional services company specializing in commercial real estate

Activity...

Publicly traded real-estate investors in the U.S. enjoyed a record-breaking year for mergers in 2021, but the war in Ukraine and soaring inflation threaten to slow that deal making in the second half of the year.

Real-estate investment trust mergers and acquisitions as well as stock mergers totaled $140 billion last year, an all-time high, according to Jones Lang LaSalle, a professional services company specializing in commercial real estate

Activity was powered by pent-up demand and real estate’s strong performance across most sectors, said Sheheryar Hafeez, managing director for capital markets at JLL.

Larger deals helped drive the big overall volume number last year, with the average transaction size reaching $7 billion in 2021, compared with the average deal size of $3.6 billion over the prior decade, according to JLL. In one larger-than-average transaction, Vici Properties Inc. agreed to buy MGM Growth Properties in a $17.2 billion deal, including debt. Blackstone Inc. and Starwood Capital Group acquired hotel owner and operator Extended Stay America Inc. for $6 billion, the biggest lodging transaction last year.

Mr. Hafeez said he expects the momentum to continue through at least June.

“We’re seeing a lot more activity from our clients,” he said. Executives are hustling to close deals before the geopolitical picture worsens and borrowing rates increase, he added.

Still, company board members may become more hesitant to green-light large acquisitions if the Ukraine crisis expands or appears likely to inflict long-term damage on the global supply chain and U.S. economy, Mr. Hafeez said.

Friday’s attack on a Ukrainian nuclear power plant by Russian forces heightened concerns for Cedrik Lachance, director of research for Green Street, a commercial real estate analytics firm. “The risk levels to the economy and obviously human lives associated with the war—whatever you thought was the potential yesterday, the potential is higher today,” he said.

Blackstone and Starwood Capital acquired hotel owner and operator Extended Stay America for $6 billion, the biggest lodging transaction last year.

Photo: Alamy Stock Photo

While the U.S. is more isolated than Europe from the war and its oil and gas businesses stand to profit as other countries refuse to buy from Russia, a protracted conflict will exacerbate inflation on food and energy prices, Mr. Lachance said. This could lower discretionary spending and hurt retail real estate in particular. The overall riskier economic picture will likely tamp down deal activity, he said.

The FTSE Nareit All Equity REITs index, which tracks publicly listed U.S. REITs, rose 41.3% in 2021, compared with the S&P 500’s 28.7% gain, marking the strongest year since 1976. The industrial and self-storage sectors were among the strongest performers in 2021, Nareit said.

Pent-up demand from the prior two years helped drive 2021’s banner year, Mr. Hafeez said. Deal making was understandably slow during the first year of the pandemic, but also lackluster in the year before Covid-19 due to concerns that the strong economic cycle was nearing an end.

“It wasn’t because of any other factor other than the human psyche,” Mr. Hafeez said. “We were working on a number of these deals and nobody wanted to pull the trigger,” he said.

REIT mergers and acquisitions volume reached $25 billion in 2019, down significantly from $86 billion the year before, according to JLL. After the pandemic-induced recession hit and most real-estate sectors rebounded quicker than expected, deal making resumed with a vengeance.

Big deals are still being signed.

Last month, Blackstone agreed to buy for $5.8 billion rental-apartment owner Preferred Apartment Communities Inc. Last week, the retail REIT Cedar Realty Trust said it would sell its grocery-anchored shopping center portfolio for $840 million to a private buyer and its remaining assets and some liabilities to a publicly traded REIT, according to JLL, which advised Cedar Realty in the transaction.

Write to Kate King at Kate.King@wsj.com