NORFOLK, Va. – When the makers of "Top Gun" were filming on board the USS Enterprise, they donated a set of black fuzzy dice to liven up the ship's otherwise drab interior.

A quarter-century later, the dice will still be dangling inside the tower of "the Big E" as the world's first nuclear-powered aircraft carrier sets sail on its final voyage Sunday.

The trinket is a reminder of the ship's storied 50-year history that includes action in several wars, a prominent role in the Cuban missile crisis and serving as a spotter ship for John Glenn's historic orbit of the earth.

"To serve on this ship, certainly in this capacity, you certainly have to be a student of the ship's history," said Rear Adm. Walter Carter, commander of the Enterprise strike group. "Fifty years of service, in our nation's history, we've never had a warship in service that long."

The Enterprise is the longest aircraft carrier in the U.S. fleet. It is also the oldest, a distinction that brings pride as well as plenty of headaches for the ship's more than 4,000 crew members. The ship is effectively a small city that frequently needs repairs because of its age. It was originally designed to last 25 years, but a major overhaul in 1979 and other improvements have extended its life.

The ship largely looks like any other carrier on the inside and has modern amenities like gyms, a coffee shop and a television station with dozens of channels. It even produces its own daily newspaper while at sea.

But even the best-maintained ship faces challenges as it ages.

"It's kind of like when you get older and you know it's harder to get out of the bed in the morning.

It takes you a couple hours to kind of really get up and then you're fine. Well, it's the same sort of thing here with Enterprise," Capt. William Hamilton, the ship's commanding officer, said days before the ship was set to deploy from Naval Station Norfolk.

Hamilton acknowledged all aircraft carriers have problems they're supposed to anticipate, but he said the Enterprise is more likely to have "unknown unknowns" than newer ships.

Machinists in charge of fixing unexpected problems say the things that can break down range from critical air conditioner units to elevators that lift fighter jets from the hangar bay to the flight deck not working. Moreover, the Enterprise has eight nuclear reactors to maintain -- six more than any other U.S. carrier.

The problems are so notorious that sailors reporting to work aboard the Enterprise are often given joking condolences by their colleagues on shore and on other ships.

The ship regularly has to make its own parts from scratch when something breaks down. Spare parts for much of the ship, which is the only one of its class, simply don't exist.

"Life is hard on Enterprise," Hamilton said. "But when they leave here, they leave knowing if they can do this, they can do anything."

The challenges aboard the ship and the need to keep spirits up were highlighted last year, when former commanding officer Capt. Owen Honors was fired for airing raunchy videos that he said were intended to boost morale. During a hearing in which Honors was trying to avoid being kicked out of the Navy, he and his lawyers frequently referenced the difficult conditions on board. Honors was found to have committed misconduct, but ultimately allowed to stay in the service. He is retiring in April.

Hamilton acknowledged that maintaining morale on the ship -- which has unofficial mottos like "There's tough, and then there's Enterprise tough" and "We eat pain like candy" -- is still vital.

"As much as anything, it's just telling them face to face that you appreciate, the Navy appreciates, the nation appreciates what they're doing and then that goes a long, long way," he said.

There's also the added bonus of the ship's crew members feeling particularly proud to serve on a ship whose name has a distinguished place in naval history and pop culture.

Crew members who weren't even alive when "Top Gun" was in theaters in 1986 use the film to explain what it is they do on the ship, as well as exactly where it is they do it.

For Petty Officer 1st Class Brian Dennis, there's also pride in his ship having the same name as the ship featured in the "Star Trek" series. He's from Cairo, Ga., the same home town as "Star Trek" creator Gene Roddenberry.

"In a way I wanted to be part of this ship, to be on the last deployment, to be a part of that. Being from Cairo, that's real huge," he said. "I always wanted to be a part of history, so being on this last deployment it'll be something I can definitely tell my children and grandchildren."

The Enterprise is heading to the Middle East on its seven-month deployment, where it will be on standby in case of conflict with Iran or piracy threats off Somalia, among other things. The ship has experience with both scenarios, participating in a retaliatory strike against Iran for mining the Arabian Gulf in 1988 and responding last year to the hijacking of a sailing vessel by Somali pirates, during which all four Americans on board were shot and killed.

The deployment will be the ship's 22nd. Following its return to Virginia in the fall, tens of thousands are expected to be on hand for a deactivation ceremony Dec. 1 that President Barack Obama has been invited to attend. But if "Top Gun" producer Jerry Bruckheimer wants to film a sequel, he'll have to find another ship.

The following summer, Enterprise will be towed to the shipyard where it was built in nearby Newport News so its nuclear fuel can be removed, a process that will take until 2015. What remains of the ship after that will then be taken to Washington state so it can be scrapped.

The ship, among the first to respond after the Sept. 11 attacks, won't be turned into a museum like some other carriers. Crews have to cut large holes in the vessel to remove the nuclear fuel, and it would be too expensive to repair, said Lt. Cmdr. Sarah Self-Kyler, the Enterprise's public affairs officer.

Instead, many of the ship's alumni want another carrier to be named Enterprise in the future, which is not uncommon, she said.

This is the eighth ship to bear the name Enterprise, and there's a room on board dedicated as a museum to past incarnations. The preceding USS Enterprise was the most decorated ship in World War II, while the first Enterprise joined the U.S. fleet after it was captured from the British in 1775.

If a future carrier is renamed Enterprise, it's unclear if the fuzzy dice will make journeys on board that ship, too, or remain in a Navy museum.