KITTERY, Maine — The USS New Mexico is at the Portsmouth Naval Shipyard for scheduled maintenance work and several system upgrades.

The Virginia-class attack submarine arrived Thursday with a crew of 15 officers and 117 enlisted personnel. The sub is expected to be at the shipyard for 22 months.

The sub, which is homeported in Groton, Connecticut, returned in April from a six-month deployment, having traveled more than 37,000 miles in the North Atlantic Ocean and Mediterranean Sea.

Cmdr. Dan Reiss, the sub’s skipper, said that sub traveled about 6,000 miles more than during a typical deployment as a proof-of-concept for extended operations.