Just last week, everything seemed so jovial.

Ford F, -2.25% unveiled its Mustang Mach-E, the company’s first battery-powered SUV, and Tesla’s TSLA, +5.04% Elon Musk, who potentially has the most to lose in an increasingly crowded electric-car market, tweeted out, “Congratulations!”

Musk was “excited to see this announcement.”