July 19 (Reuters) - Elon Musk's elusive goal of creating self-driving software is driving the Tesla CEO to prioritize sales over profits, a strategy that could deepen a price war - and investor concern.

Shares of the automaker fell 3.5% in premarket trading on Thursday after Musk signaled there might not be any let-up in cuts that have already sent gross margins to a four-year low.

"The short-term variances in gross margin and profitability really are minor relative to the long-term picture. Autonomy will make all of these numbers look silly," Musk said.

Musk believes self-driving could one day account for a majority of Tesla's value and give it a cushion other automakers lack as they focus on turning their EV operations profitable.

But his focus on self-driving risks sacrificing current profitability for technology that is in the crosshairs of regulators after a number of crashes involving Tesla vehicles.

"That margin outlook may be a disappointment for some, present company included, that were looking for margins to slowly improve this year," said Gene Munster, managing partner at Deepwater Asset Management - a Tesla investor.

In the second quarter, automotive gross margin, excluding regulatory credits, fell to 18.1% from 19% in the first, according to Reuters' calculation. It also marked a sharp decline from the 26% reported a year ago.

Analysts said the margin weakness would likely weigh on the stock, which has more than doubled this year thanks to the growing adoption of the company's charging system.

Still, they were mostly positive about Tesla, with more than seven upgrading the stock while four downgraded it.

The stock trades at a pricey 12-month forward price to earnings multiple ratio of 72.65, compared with Ford's 8.45.

(Reporting By Peter Henderson, Aditya Soni and Akash Sriram; Editing by Dhanya Ann Thoppil)