THEY battled a sweltering heatwave, gruelling mountain climbs and perilous sheer drops.

But it was a dramatic encounter with a marauding dog which almost took the wheels off their epic 1,000KM bike ride in memory of a Hampshire sailor lost at sea.

Riders Dan Williams and Ollie Matthews jubilantly crossed the finish line at the Bargate in Southampton last night at the climax of their Port 2 Port 1000 ride from Britain to Spain.

The pair rode in memory of Dan’s cousin James Male who went missing in the Atlantic last May.

James, 22, was sailing back to Southampton after a regatta in Antigua when his boat the Cheeki Rafiki capsized about 720 miles east-north-east of Nova Scotia, Canada.

Following the launch of a UK petition signed by more than 200,000 people US Coastguards extended their search eventually finding the upturned hull and a life raft still on board and no trace of James and fellow seafarers Paul Goslin, Steve Warren, both of Somerset, and Andrew Bridge, of Farnham in Surrey.

Now riders Dan and Ollie, both 21 of Totton, said their journey was almost cut short three days into their 10 day ride to Southampton from Santander.

The animal chased them from a farm near Bilbao, Spain, and Dan, 21, said: “I was pedalling to get away, took a corner too fast and hit a crash barrier. As I hit the ground all I could think of was looking round to see where the dog was but it had gone. It was a shock and I grazed my elbows, back and hip.”

He made a sling from cotton wool and electrical tape before riding on.

The pair rode 60-70 miles a day temperatures of up to 42°C and raised more than £1,500 to split between the RNLI and the Rose Road Association Hampshire children's cause.

Dan, who was promoting the importance of sailors carrying locator beams on vessels, wore one of James’ wrist bands on the trip.

He added: “This was in memory of him and he would be proud. He would have wanted to do it himself as he loved challenges.”

said gruelling mountain climbs in the Pyrenees and soaring temperatures meant it was a race against time to get to the end but added: “It was such a journey with incredible scenery.”

Ollie thanked Britanny Ferries for sponsoring their crossing from St Malo to Portsmouth.

Dan’s dad Darren Williams was at the finish line along with James’ parents’ Graham and Lorraine.

He said: “It’s been fantastic and they’ve done James proud.”

The Marine Accident Investigation Branch found the Cheeki Rafiki capsized after its keel detached caused by previous groundings and subsequent repairs.

Sponsor the riders at uk.virginmoneygiving.com/team/port2port1000.