The Navy has canceled port visits in the United States for the rest of the fiscal year because of budget cuts, leading to the cancellation of many Fleet Week festivals.

But the sea service chose to dispatch this ship to Alaska for a four-day celebration that included public ship tours and a ceremony with the governor, two U.S. senators and the commander of the Navy’s Pacific Fleet. About 4,000 people attended the commissioning, the Navy said.

Anchorage is the second ship to be named for the city. The first Anchorage, LSD 36, was commissioned in 1969 and served in Vietnam, Operation Desert Storm, and Operation Iraqi Freedom before being decommissioned in 2003.