A fire started in the engine room of the Carnival Splendor on Nov. 8, and knocked out the ship's communication and propulsion abilities. The ship was left drifting 150 miles south of San Diego without any way of getting to land.
No one was injured in the fire, but nearly 4,500 crewmembers and passengers were stuck at sea for three days. Coast Guard crews and others had to fly in food, water and medical assistance before the ship was tugged to San Diego.
It arrived at the Port of San Francisco the afternoon of Jan. 23 to receive two new generators and a new engine, port spokesman Gerry Roybal said.
"It only had partial power when it arrived," Roybal said. "When it came limping into the port, there weren't visual signs that it wasn't functioning."
"When we opened it up, though, it was clear that the engine room, the generators and some internal wiring had been badly burned," he said.
The work to repair the ship could only be done in San Francisco, Roybal said.
"The ship needed to be completely taken out of the water," he said. "We have the only dry docking asset big enough to accommodate a ship of that size on the entire West Coast."
The ship is about 950 feet long and weighs approximately 110,000 tons, Roybal said. It has 14 decks and can accommodate 5,500 staff and passengers.
The size of the engine required to power such a massive ship was also quite daunting, Roybal said.
"It was the size of an 8-by-10-foot bedroom and weighed 106 tons," Roybal said.
The engine was flown in from Italy on what Roybal called the largest cargo plane in the world, Antonov 21.
"A sister ship was being constructed in Europe at the time of the incident," Roybal said. "The engine specifications for that ship matched the Splendor's, and Carnival had the new engine piece jetted out here to expedite repairs."
"We haven't seen engineering work of this magnitude in close to 45 years -- since San Francisco built ships at the port," Roybal said.
More than 950 local professionals helped repair the ship over its three-week stay at Pier 70, providing a much-needed boost to San Francisco's economy, Roybal said.
"In addition to all the local workers hired, probably 30 percent of the crew was on board the ship when it arrived," Roybal said. "That means that they are frequenting our restaurants, hotels and popular entertainment spots."
The ship will now sail down to Long Beach to welcome its first passengers since the accident.
The Splendor had cruises canceled on Jan. 16, 23, and 30, and Feb. 6 and 13. It's scheduled to re-enter service to the Mexican Riviera on Feb. 20.
ABC7 News contributed to this story