General Dynamics NASSCO received an order for six oilers — auxiliary ships that rendezvous with U.S. Navy combat ships at sea and refuel them — that could be worth in excess of $3.1 billion.

The Navy awarded a $640.2 million contract to design and build the first ship in the John Lewis class, and make preparations for five future ships, on June 30.

Congress must approve funding for the ships in yearly defense bills, and the Navy must exercise certain contract options for the deal to reach the expected $3.16 billion ceiling.

Funding for the first ship was approved with the 2016 defense bill. NASSCO said that it will begin work on the project immediately.

The deal means continued employment for the shipyard’s workforce.

In the short term, NASSCO expects to hire engineers and naval architects, spokesman Dennis DuBard said.

The Barrio Logan shipyard expects to deliver the first oiler in 2020 and the last one in 2025.

The Navy could easily decide it needs more than six oilers. In the spring, the service said it might need 17 of them.

As part of the June 30 deal, NASSCO will also do design work on the Navy’s new amphibious ship, called the LX(R).

“We are pleased to be building the next generation of oilers and participating in the future design efforts of the LX(R), two very important ship programs for the fleet,” Fred Harris, president of General Dynamics NASSCO and Bath Iron Works, said in a prepared statement.

General Dynamics stock trades on the New York Stock Exchange as GD.

A Pentagon announcement from June 30 said the contract includes line items for five follow-on ships, as well as options for special studies, engineering and industrial services, provisioned items orders, LX(R) contract design support, cost reduction and implementation, other direct costs and special incentives.

Fifty-nine percent of the work will be done in San Diego and 1 percent in Chula Vista. Some 4 percent will be conducted in Mexicali, Baja California, Mexico.

The Naval Sea Systems Command of Washington, D.C. awarded the contract.

Separately, NASSCO is building its fourth Expeditionary Sea Base ship for the Navy, the future USNS Hershel Williams. The business recently received a contract to buy material for a fifth ESB. Ships in the series have previously been known as the Mobile Landing Platform and Afloat Forward Staging Base.

The business also repairs Navy ships and builds commercial tankers.