ANNAPOLIS, MAY 26 -- The mighty J boats Shamrock V and Endeavour hammered through five hours of rain, gusty winds and a clamoring mass of 1,000-odd spectator craft today, then sped to a photo finish just four seconds apart after nearly 30 miles of racing.

Shamrock V, Sir Thomas Lipton's 1930 America's Cup entry, won this heralded first clash of the Js on the Chesapeake Bay by a nose, although a bit of last-minute stage-managing may have helped.

"M-I-C . . . K-E-Y . . . M-O-U-S-E!" sang skipper Buddy Melges after taking the gun under dark, stormy skies off Sandy Point State Park. "Did we show 'em something, or what?"

Melges, the 1972 Olympic sailing gold medalist, was doubtless embarrassed about hitting a turning mark halfway through the race, a mistake so egregious he was forced to sail two 360-degree circles as a penalty to blot it from the record.

That gave Endeavour skipper Gary Jobson, far behind at that juncture, a way back into the race, and Jobson took up the cudgel.

After a furious tacking duel up the final, 10-mile leg, Endeavour slid by Shamrock with just a quarter-mile to go to the finish. She seemed sure to win then, having proven clearly the faster of the two behemoths in all four of their previous races.

But Jobson and his 30-member crew inexplicably blew the lead when they fouled a line on the final tack and he briefly lost control of the boat. By the time things were sorted out, Endeavour and Shamrock were side-by-side, Endeavour behind by a matter of feet, and so it ended.

Cynics wondered if the razor-sharp finish wasn't contrived to create a little extra excitement. But who needed it? And who really cared? The day was a spectacle no one who watched will soon forget, culminating in the final, hard-charging tacking duel up the bay.

In that duel, Endeavour, T.O.M. Sopwith's 1934 Cup challenger, nearly overtook Shamrock once in a freshening breeze, then fell back to make a headsail change, then came galloping up again to barely nip her rival as the two went careering under the Bay Bridge.

So huge are these vessels, the largest class of yachts ever to race, they barely scraped under the 184.5-foot span.

Endeavour, refurbished over five years at a cost of $10 million by former Baltimorean Elizabeth Meyer, clearly was the faster of the two Js in the early going.

But Melges managed to get Shamrock going as the day wore on and she appeared downright competitive as the boats headed toward the finish in a gathering storm, tossing creamy bow waves as they churned along at 11 knots.

For most of the spectators, that sight alone made the journey out into the choppy bay on an uninviting day worth the effort.

Tonight, the skippers toasted each other in an awards ceremony at the Annapolis Yacht Club. Then it will be on to Boston and Newport, next and only stops in the J-Boat tour this summer.

Who will win next?

Who knows. Who cares?

It's enough just to see these beauties crashing along, living remnants of sailing's glory days.