As sales ramp up at Tesla Motors (TSLA 12.06%), the electric-car pioneer is making a move to secure its access to the special batteries that make its car vroom.

On Wednesday, Tesla announced that it has extended the duration of its supply agreement with battery manufacturer Panasonic Corporation (PCRFY -3.03%). This agreement, originally inked in 2011, had Panasonic manufacturing the automotive-grade lithium-ion battery cells that Tesla uses in its battery packs. Each Tesla Model S incorporates approximately 7,000 Panasonic battery cells into its automotive battery (in the biggest Model S battery pack).

Now, the companies have agreed to update and extend this contract's duration so that it will not expire in 2015 as originally planned, but rather run through 2018. Over the course of four years, Panasonic expects to supply nearly 2 billion battery cells for use in Tesla's Model S sedans and its upcoming Model X SUV. Assuming the Model X uses an approximately equal number of battery cells in its battery pack (the company declined to confirm this), the agreement would therefore secure for Tesla a supply of batteries sufficient to enable it to build some 285,000 additional electric cars over the four years.

Tesla expects to deliver 21,000 Model S sedans worldwide this year. The company has estimated sales could nearly double to 40,000 next year as the Model S goes on sale in Europe and Asia.

According to Tesla, the batteries Panasonic supplies to it are "optimized" for performance in powering electric cars, with the result that when combined into Tesla-built battery packs, they give the company's cars "an industry-leading range of approximately 265 miles for the Model S."

This suggests that batteries sold by other manufacturers might not be quite as useful to Tesla, or easily substitutable in the event that rival car companies could lay claim to Panasonic's battery manufacturing capacity. This makes ensuring a continuous supply from Panasonic important to Tesla for manufacturing purposes.

-- Material from The Associated Press was used in this report.

link