THE flags were flying, the band was playing and the crowds lining the quayside were cheering as we sailed into Whitby Harbour.

The welcome, of course, was not for those of us aboard the BBC-chartered cruise boat Regal Lady.

We were basking in the reflected glory of HM Bark Endeavour, the replica of Captain James Cook's famous vessel as part of the flotilla of 100 or more craft, from packed pleasure boats to lone canoeists, following the vessel on its return to the port where the original was built.

Two hundred years after Cook's history-making voyage to the other side of the world, the replica Endeavour was on the last leg of completing that journey in reverse.

Whitby turned out in force, as if to emphasis the sentiment expressed in the banners hanging from windows along the route: Welcome home Endeavour. There was even one saying G'day mates, a nod to the replica's Australian origins.

The voyage of the Regal Lady was less epic. We set sail early from Scarborough in pursuit of Endeavour, which had anchored in Robin Hood's Bay overnight, and to accompany her into Whitby Harbour.

Slowly the dot on the horizon became identifiable as Endeavour. And, as we drew alongside, she was the centre of attention as boats of all shapes and sizes waltzed around her, circling like a photographer does his model.

Then, amid the sound of cannon fire and much sounding of horns, Endeavour pointed herself towards the harbour and headed to her spiritual home.

Being in the middle of that exuberant welcome you could only echo the comment passed on later by of one of the ship's crew: "Amazing".

The welcome was no less enthusiastic than Endeavour's first visit five years ago. Tens of thousands of people lined the harbour side and the cliff tops.

Others hung out of windows and climbed on to the roofs of houses for a better view. There wasn't space in the crowd to swing a ship's cat. All the time, Captain Cook himself gazed down from his lofty plinth on the cliff overlooking the harbour as he surveyed the celebrations.

As the crew of 56 disembarked - and many had been at sea for the whole of the four-and-a-half month journey - the ship was transformed into a museum, depicting cabins and decks as they would have been in Cook's time in the 18th Century. From today, Endeavour will be open to the public for inspection for two months.

The vessel is a full replica of Cook's ship, which was originally built - in Whitby in 1765 - to carry coal.

Three years later, she was bought by the Navy Board and renamed HM Bark Endeavour. The vessel took Cook to Australia for the first time in April 1770.

Built in Australia in the late 1980s and early 1990s, the replica was intended to be one of the most authentic ever made. She was built to original specifications from plans held by the National Maritime Museum in Greenwich, London.

Her mooring at Endeavour Wharf, in Whitby, is near where the original vessel's keel was laid.

For the town of Whitby, Endeavour represents a major tourist boost. Her visit five years ago was estimated to have pumped at least £5m into the local economy, attracting more than a million visitors to Whitby in just over a week.

Judging by yesterday's homecoming, the interest in Endeavour is even stronger than ever.

HM Bark Endeavour is berthed at Endeavour Wharf, Whitby, until August 12, and is open to the public daily from 9am to 7pm (last admission 6pm). Tickets are £7 adults, £5 senior citizen/disabled, £4 child, £18 family ticket (for five). There are special rates for coach parties, school parties and group bookings. Details are available from the Endeavour UK office on (01723) 232587 or from the vessel's website, at www.barendeavour.com.au

* Atlantic Endeavour, a documentary about Endeavour's homecoming, is being shown on BBC1 on Sunday, at 6.50pm.