Cannons roared, a brass band played and thousands of gawking admirers lined the shore today as the USS Constellation returned to Baltimore's Inner Harbor--free of both the fraudulent facade that once was used to lure tourists and the rotten timbers that had threatened its survival.

After decades of pretending otherwise--and a controversy that included a phony letter that purported to bear Franklin Roosevelt's signature--the ship that went home after a three-year overhaul was hailed as a sloop of war built in 1854, the last Navy ship powered solely by sail.

No longer was anyone suggesting that it was the famous frigate built in Baltimore in 1797 and a sister ship to the USS Constitution--"Old Ironsides"--that is berthed in Boston's Charlestown Navy Yard.

The historical controversy was the backdrop to a sparkling day of festivities as the Constellation was towed to its dock from a shipyard near Fort McHenry, where it underwent a $7.5 million restoration. Preceded by a fireboat spraying aloft a fountain of water and trailed by a flotilla of pleasure boats, the Constellation was gingerly nudged to the pier by two tugboats.

The ship--a historical icon and tourist magnet for the city's waterfront since 1955--had been missed by the thousands of Baltimoreans who cheered from Federal Hill, from skyscraper rooftops and from piers along the way. But what ship were they cheering?

The story of the Constellation--and just which Constellation Baltimore had--had perplexed historians and naval buffs for most of this century.

The search for the truth uncovered forged documents in the National Archives apparently planted by those who were confident--or at least wanted to believe--that the vessel dated to 1797. A 1991 report by the Navy's curator of ship models seemed to settle the matter. But for some diehards, the dispute lingers today.

"It's a tremendous story," said Louis F. Linden, a maritime and museum consultant who directed the Constellation Foundation in the mid-1990s. "The story of the frigate fraud is as fascinating or more fascinating than the actual history of the ship."

There was an 18th-century, 36-gun frigate named the Constellation that served in battle against the French in the West Indies. It was built at a shipyard along Harris Creek in Baltimore, manned by recruits from the city and beloved in the U.S. Navy.

In 1853, after more than a half-century of service, the frigate was dismantled at the Gosport Navy Yard in Virginia. A year later, about 600 feet from the old Constellation's timbers, a new sloop of war 12 feet longer than the frigate was constructed, the naval curator's 1991 report said.

It also was named Constellation, beginning a tradition for perpetuating the proud name that the Navy continues with the USS Constellation aircraft carrier.

While it didn't have the same illustrious battle record as its namesake, the second Constellation served in the Mediterranean in the mid-1800s, including tours along the African coast, where it intercepted slave ships and freed 700 slaves. It later served, from 1871 to 1893, as a training ship for the U.S. Naval Academy, and, though it has not sailed under its own power since the turn of the century, it served as a shore-based flagship for the commander of the Atlantic Fleet during the early days of World War II.

Each annual report of the Navy from 1854 to 1908 listed the ship as built in Norfolk in 1854. Then, said the 1991 report by Dana M. Wegner, the Navy's model ship curator, "without explanation, the official records for 1909 onward stated she was built in Baltimore in 1797."

In fact, Linden said, not long after the Civil War, people had begun referring to the ship as the "frigate."

In the 1920s and 1930s, the Navy contemplated scuttling the ship because it was deteriorating. Thousands of Baltimoreans petitioned the government to send it here instead. By then, many of them believed that the Constellation was the frigate that had been built here.

By 1955, the Navy agreed to give the ship to Baltimore. A private foundation was formed to take title to the vessel and to begin raising money to restore it. By then, naval historians had begun to write articles pointing out that the Constellation that everyone had thought was the original frigate actually was built in 1854 in Virginia.

But, Linden said, "the people who brought her here convinced themselves, rightly or wrongly, that unless they had some close ties to Baltimore, they'd never raise any money."

In the words of the current Constellation Foundation chairman, Gail Shawe, the debate grew "ugly."

In the 1960s, those who believed that the ship was built in 1797 said they discovered documents to support their cause. They included a 1918 Navy Department document that said the ship was the frigate, as well as a 1913 letter purported to have been signed by then-Acting Secretary of the Navy Franklin Deleano Roosevelt, who wrote, "I feel that the Constellation is as original as any ship afloat."

Later, the FBI determined that the 1918 document had been written with a typewriter made in 1953. And analysts noted that the one-page Roosevelt letter contained 14 typographical errors. "Hardly executive-quality typing," Wegner wrote in his report, "Fouled Anchors: The Constellation Question Answered. A probable forgery."

The debate had a practical effect on the condition of the ship. In their desire to make the Constellation appear as the original, some of the ship's early admirers "restored" it to the appearance of an 18th-century frigate, adding a second gun deck and making other alterations. "They tried to tart it up so that it looked like the 1797 frigate," Linden said. "With no real historical basis, they did things like cut a hatch hole in it."

Wegner's 1991 report finally convinced most people that the ship was not the original frigate. And his report helped guide the restoration efforts, bringing the ship close to looking as it did when it was built in 1854.

"In some ways she has more pertinent history for today," Shawe said yesterday as the Constellation glided across the harbor. "She interdicted slave trade. Remember she sits in an urban community, and that's important."

The Constellation also is the last sail-powered ship commissioned by the Navy. It is a living piece of history, and a walk on its deck is a spine-tingling taste of what life for its sailors must have been like.

Baltimore residents who turned out today to welcome the ship home seemed to care little about the controversy and said they were just glad to have the ship back at the Inner Harbor.

Charles Latrobe, 43, who was waiting to tour the Constellation this afternoon, said he remembered going aboard the ship as a child.

"I was never clear on the controversy," he said. "It's an important part of the U.S. Navy. I'm just glad it's here."

CAPTION: The USS Constellation returns to its berth in Baltimore's Inner Harbor after three years of refurbishing. At top, people peer from gun ports in the stern of the sloop of war, constructed in 1854.