Tesla reported weaker-than-expected second-quarter profit, missing Wall Street forecasts as spending climbed sharply. The automaker also posted negative free cash flow for the first time in more than two years, a sign that higher investment is putting more pressure on its finances.

Much of the focus is on Elon Musk’s push into artificial intelligence, which appears to be driving a faster pace of capital outlays. While Tesla has long been known for investing heavily in growth, analysts signaled that keeping up the current level of spending could become more difficult if profits and cash generation remain under strain.

The results highlight a balancing act for Tesla. The company is trying to fund ambitious technology plans while also managing investor expectations for margins, earnings and cash flow. A period of cash burn can be tolerated if markets believe the spending will support future growth, but disappointment on profits tends to intensify scrutiny.

For investors, the latest quarter raises a broader question about how quickly Tesla can turn aggressive AI and infrastructure investments into stronger financial performance. Until that becomes clearer, concerns about the company’s capital-spending pace are likely to remain front and center.