In the bowels of the T.S. Kennedy, the multistory engine room rumbled to life Thursday afternoon. Pipes hissed, gears clanked and belts whirred as Massachusetts Maritime Academy students and ship crew members hustled by each other, each doing their parts to wake the great ship. Twenty-four hours earlier, the vessel rested silently at port, serving in its capacity as the training ship for the maritime college.

But Thursday morning, federal officials ordered the vessel to the disaster ravaged mid-Atlantic to house relief crews as they work to clean up the destruction after Hurricane Sandy roared through the region earlier this week.

On Sunday, the 540-foot ship will depart for Elizabeth, N. J., on the New York border near hard-hit Staten Island, for a month-long stay.

The ship will act as a self-contained hotel for the army of federal emergency workers, power crews and others helping get the area back on its feet, Adm. Richard Gurnon, president of the college, said. The vessel can hold a maximum of 700 people, including about 30 crew members, but academy officials don't yet know how many they'll be asked to house.

The idea of using a federally owned training ship to house relief workers was pioneered in New Orleans after Hurricane Katrina in 2005. In fact, the Kennedy would have sailed down as well, but was undergoing repairs at the time, Gurnon said.

Large ships can sustain sizable crews for long periods of time without taxing the delicate resources of a disaster-affected area, Gurnon said.

"The ship is a terrific asset in an emergency such as this," he said. "First responders can have a hot shower, clean bed and a hot meal without stressing the fragile recovery there."

The short preparation time has posed a challenge for the Kennedy's crew.

"This is pedal to the metal," said Chief Engineer Timothy DeMoranville. "You don't just push a button and it goes."

The ship typically takes between 36 and 48 hours to get ready, but crew members were given 24 to 36 hours so it could be in New Jersey to start next week. It is fully fueled, but needs to be outfitted with food and other essentials for workers.

Cadets will work through the next few days, loading equipment and assisting the crew, but they will not make the trip south, Gurnon said.

Instead, between 24 and 36 merchant mariners from the region and across the country will be hired as crew.

On Thursday, the crew members already in place began the process of heating up the massive steam engines.

This means following a specific method that involves checking pipes, filling water tanks and then heating them to nearly 600 degrees, DeMoranville said.

The compressed time means the crew will have to work around the clock to get everything seaworthy for the 12-hour voyage south. "We're in the middle of what I call 'turbo activation,'" he said. "But we'll be ready."

This is the first relief deployment for the Kennedy. In 2010, the ship was initially rerouted from a sea term to assist in recovery efforts in the aftermath of the earthquake in Haiti. But that plan was scrapped when the U.S. Navy sent another ship.