"KEEP going, it's just over the brow of that hill." I keep going.

I get to the top of the hill, and there's another damn hill in front of me. I should have known. Tricked again. I put my head down, grit my teeth and keep pedalling. I suppose the clue is in the name - mountain biking.

My tormentor is Pete Laing, one of the driving forces behind next month's Selkirk MTB Marathon, organised by Durty Events. It all started off so well, too, a nice cup of tea in Pete's house and a gentle wobble through the town of Selkirk - which seems to have almost as many statues as Glasgow's George Square including one to Sir Walter Scott and the explorer Mungo Park.

We turn off road on to the path that runs beside the canal-like Mill Lade which powered the town's mills in the heyday of its textile industry. Pete, who grew up here, recalls hearing the hooter going at the start and end of shifts in the mid-1960s and watching hundreds of people throng the streets. Sadly, these days are gone - swept away by globalisation - although Lochcarron of Scotland still has a mill and visitor centre.

This area is prone to flooding and work is taking place to control the water flow, which means diggers and churned up dirt but it's nothing to worry about. Not for a competent cyclist like me. My 14-year-old son, Finlay, who is streaking ahead, reminds me that the last time I cycled along a stretch of canal like this I somehow managed to, er, ride right into it and ended up in the Western Infirmary in a fog of concussion, not sure what day it was. Yeah, yeah, I hadn't forgotten.

We pass an impressive piece of "green" engineering - an Archimedes Screw that has been installed on Murray's Cauld, on the north bank of the Ettrick Water, to use the water's energy to power the Bowhill estate. It's a modern take on an ancient idea and is an interesting piece of engineering and an ambitious idea. Pete tells us there is a café near here called The Waterwheel, which does good coffee and cakes. Unfortunately, I can't vouch for that as we're off again - no time for cakes for us - past the confluence where the rivers Ettrick and Yarrow meet and into the Duke of Buccleuch's Bowhill estate, which is open to the public and has a popular adventure playground.

Pete, a renowned trail and course designer, began mountain biking 20 years ago with friends and they quietly created their own routes, on river banks and Forestry Commission land. As landowner attitudes to public access softened they got more ambitious, culminating in events such as the Selkirk Marathon. It has three courses - the 25km, a 50km and also a 75km for the toughest of the tough. He says he is constantly heartened by the attitudes of farmers and landowners who are happy to allow access as long as riders are sensible, ie no hurtling through fields at lambing time. It's basic stuff, and if you don't know to shut gates and avoid forestry operations, then you don't have any business being out and about.

The route is a constantly changing mix: there's a short stretch of tarmac, gnarly riverside paths which plunge and swoop, roots threatening to kick you off into the tumbling water far below. We stop at the ruined Newark Castle to catch our breath after a steep climb, then we climb again, up a gravelly farm road then onto the pathless open hillside. It's boggy and very hard going. A real slog. But we press on. It's too steep and slippy to cycle so we push the bikes up the hill. It's like hill-walking with the added bonus of having a bicycle to push. I mention to Finlay that maybe his choice of city clobber - black skinny jeans and a heavy-looking hoody - was ill advised. He mutters something but I can't quite make it out; probably for the best.

That's when Pete plays his joker. "Keep going, it's just over the brow of that hill." I fall for it, of course. After another 15 minutes of climbing we reach the Southern Upland way and spin along it until the next hill looms. It's as steep as 1970s inflation and as heartless as a hedge fund manager.

Half-way up, I manage to slip the chain off. Result. By the time I loop it back onto the cogs, it seems easier to push the bike than cycle up the hill. Shame. But eventually we reach our destination - The Three Brethen at 1300ft, a trio of cairns which date back to the 16th century. I get my breath back and savour the views as Pete points out the Eildon hills near Melrose, and the towns and villages folded between the hills. "That's England over there," he says, gesturing towards the Cheviot hills. Then he points downwards. There's a fearsome-looking drop straight down the side of the hill. And we're off.

It's fast. We plunge through deep, dark, water-filled holes, batter across bone-shaking, teeth-loosening scree, dodging boulders and hoping for the best. Even with suspension and chunky forks, my whole body is shaking like I'm on an old wooden rollercoaster. It's a blast.

Then, suddenly, we're back in Selkirk, covered in mud and daft grins. We clean ourselves up as best we can and check into the County Hotel, to meet my wife and daughters who have been horse riding at Broomhill Farm Equestrian Centre. Downstairs, the hotel, which dates from 1746, is sleek and contemporary, with a stylish bar and a renowned restaurant. We head up the twisty stairs, to our ensuite rooms. Never has a shower felt so good.

The Selkirk Marathon takes place on Saturday May 2. See www.selkirkmtbmarathon.com

Garry Scott and his family were guests of the county Hotel, Selkirk www.countyhotelselkirk.co.uk

5 things to do in the Borders

Horse riding

Broomhill Farm Equestrian Centre is a small, friendly yard just outside Selkirk catering for beginners to more advanced riders. It offers lessons and pony trekking and provides safety kit such as hats.

www.facebook.com/BroomhillEquestrianCentre

Stately home

Dating from 1107, Traquair House is a fascinating treasure trove of Jacobite memorabilia. There is a brewery, a maze, a petting zoo and gardens. Unlike most "big hooses" this one actually has a soul.

See www.traquairhouse.co.uk

Historical site

Flodden memorial and gardens:

Possibly the saddest memorial in Scotland, there is a striking statue and a small interpretative garden which tells the story of the battle which sealed Scotland's fate as an independent nation.

Mountain Biking

Glentress is one of the best mountain biking centres in the British Isles. Trails of all grades, a visitor centre, toilets, café, showers and accommodation.

www.7stanesmountianbiking.com and www.alpinebikes.com

Staying over

The County Hotel is bang in the centre of Selkirk. This characterful hotel dates from 1746. The rooms are comfy, stylish ensuites; the restaurant serves up delicious contemporary cuisine and the bar has a good range of beers, including the local Dark Horse. A warm, friendly place run by a Norwegian couple. Highly recommended.

www.countyhotelselkirk.co.uk