Tesla Motors Inc. struck a deal Wednesday with Ohio auto dealers that could allow the electric-car maker to de-escalate a battle over its direct-to-consumer retailing model, at least for the near term.

Under the agreement, Tesla would be allowed to keep operating two company-owned retail stores in the state, and open just one more. The deal requires approval from the Ohio state legislature. The proposed bill would bar all other auto…