Electric car maker Tesla Motors Inc. struck a deal Friday with New York Gov. Andrew Cuomo and the state's car dealers that will allow it to keep five existing company-owned stores, as long as it doesn't open more direct sale outlets in the state.

According to the agreement between Tesla, Mr. Cuomo, legislative leaders and auto dealers, additional Tesla retail locations would need to be established under a "strengthened dealer franchise law." In return, elected officials agreed to drop language in a bill in the state...