The tall ship Danmark, a 250-foot, three-masted, full-rigged, steel-hulled training vessel of the Danish merchant marine, had to pull into Washington under diesel power yesterday, its sails furled in a stiff headwind in the middle of the Potomac River.

Earlier Capt. Vilhelm Hansen, skipper of the Danmark for the last 21 years, had radioed that he was going to guide the ship, sails billowing, under a narrow span of the Woodrow Wilson Bridge, a drawbridge serving as the southern tip of the Capital Beltway.

If he had tried that, the 52-year-old ship, which was used to train U.S. Coast Guard cadets during World War II, might have smacked spectacularly against a support column, knocked out the bridge, trapped thousands of Friday morning commuters and brought the nation's business to a halt. It probably would have ended with a declaration of war.

Wisely, Skipper Hansen played it safe.

"I've been very nervous," he said after being piped ashore at the D.C. Harbor Police pier, where the Coast Guard Band, honor guard, drill team and a score ofdignitaries from the Danish Embassy and the District of Columbia were waiting to greet him. "It was the same as walking the plank."

He laughed. "It was a bit strange," he elaborated. "Shifting winds, shifting winds."

The Danmark, bearing a crew of about 100 budding Danish seamen as well as Walter and Betsy Cronkite, was fresh from a 92-mile voyage from Hampton Roads, where the Potomac meets the Chesapeake Bay. It was joined at journey's end by four American tall ships and will be docked at the waterfront through Thursday as part of the city's continuing Riverfest fete.

As the fireboat John H. Glenn led the way, spewing celebratory geysers into the dazzling sky, the flotilla cruised majestically into the channel. Some four dozen smaller vessels accompanied the procession, crossing back and forth in its wake.

"That idiot, that absolute idiot!" ventured Coast Guard Adm. Howard Thorsen, head of the Coast Guard's research and development command, as he stood aboard the excursion boat First Lady watching a sailboat cross the paddlewheeler's bow with 60 inches to spare.

"We've got to nail that guy," agreed Jim Rooney, general manager of Washington Boat Lines.

On the First Lady's upper deck, a Dixieland fiddle/banjo duo was taking requests for everything from "Wonderful Copenhagen" to "Beat It." Joy Friedman of Bethesda instructed them in the proper rendering of the "Woody Woodpecker" theme.

"You're not accenting it enough," she scolded, and then, illustrating, burst into song. Friedman, who said she is celebrating her 41st wedding anniversary, added, "I'm at a point in life where you hope to do the things you always wanted to do and feel free enough to do them. I went on a helicopter. I want to go on a balloon ride in France. And now I'm doing this. This is just fantasyland."

Danish-born Ruth Jespersen, an American citizen for the last three decades, shed a few tears at the sight of the Danmark and crew, who doffed their caps and waved at the slightest provocation. "It's something from home," she said. "Even though I'm an American now, I miss it."

When the ship pulled in, about 100 people were on hand to meet it, crowding the pier in the noonday sun.

"Hi, I'm Vice Commandant Ben Stabile," said a smiling man in a Coast Guard admiral's uniform, offering his hand. "I'm in charge of vice."

The Cronkites, noted sailing enthusiasts, joined the cruise in Norfolk, Va., two days ago, whereupon Capt. Hansen ejected one of his officers from a stateroom. Yesterday Walter Cronkite sat authoritatively in the bridge, and for a moment it was hard to tell him from the skipper.

"He's just 'playing boat,' " Betsy Cronkite explained.

"She always says I'm 'playing boat,' " Walter Cronkite protested, "and it doesn't matter if I'm fighting a hurricane or sitting at the dock having a drink. But this has been a marvelous cruise. I feel like Walter Mitty."