Lawmakers and local officials in Maine , one of the hardest-hit states with three closings , including the Portsmouth Naval Shipyard , vowed to challenge the Pentagon 's plans that would cost nearly 7,000 military and civilian jobs . ''