U.S. construction spending edged up in May as higher mortgage rates because of the Middle East conflict constrained homebuilding.The Commerce ​Department's Census Bureau said on Wednesday that construction spending rose 0.1% after a downwardly revised 0.3% increase in April. Economists polled by Reuters ‌had forecast construction ⁠spending gaining ⁠0.1% after a previously reported 0.4% increase in April.Construction spending fell 1.5% on a year-over-year basis in May. Spending on private construction projects was unchanged after rising 0.3% in the prior month. Investment in residential construction increased 0.3%, reflecting renovations.Spending on new single-family ​housing projects dropped 0.1%. It tumbled 4.0% ⁠year-on-year in ‌May.The U.S.-Israeli war with Iran boosted oil ​prices, driving up ​inflation and mortgage rates. The average rate ⁠on the popular 30-year fixed-rate mortgage has increased ​by about 50 basis points since the conflict ​started at the end of February, data from mortgage finance agency Freddie Mac showed.It averaged 6.49% last week. Spending on multi-family housing units, which account for a small share of the housing market, dipped 0.1% in May.Investment in private ‌nonresidential structures such as power plants and factories declined 0.3% in May. Spending on factory construction dropped ​1.3%, while ​outlays on ⁠power plants eased 0.1%, despite a surge in the construction of data centers to support artificial intelligence.Investment in public construction projects increased 0.5% after a similar gain in April. State and local government construction spending rose 0.4% in May while outlays on federal government projects jumped 1.3%, likely boosted by the building of detention centers as part of an immigration crackdown.