When it comes to heritage, not many Scottish institutions can match Perth Racecourse, which can trace its pedigree back exactly four centuries this year.

But when former jumps jockey Sam Morshead swapped saddle for suit in 1988 and took over the reins of an ailing business, it was not guaranteed to stay in the race.

Attendances were hovering at around 25,000 per season and sponsorship had struggled to reach £20,000. When general manager Mr Morshead celebrated 25 years in charge a month ago, almost 60,000 punters had been through the turnstiles as the season ended and corporate backers had injected £110,000.

He says: "When I came, I saw it as a real gem of a site, waiting to be polished."

Horse-racing began on the city's South Inch in 1613 and on the North Inch in 1784, moving in 1908 when the Mansfield family transplanted it, stand and all, to their Scone Palace estate a mile up the road.

Mr Morshead, born in Ireland to Cornish parents, had started riding as a point-to-point amateur, and became a successful jockey reaching fifth position in the riders' championship. But in 1987, aged 33, he was forced into retirement following a serious fall. He says: "When you are riding you think this is your working life: I was always aware that I would want to do something probably within racing, and I was determined to keep a good name."

At that time Scottish racing was run entirely from Ayr with Kelso, Musselburgh and Perth as satellite courses, he recalls. "I went up to Ayr for an interview, and to my surprise became a trainee clerk of the racecourse."

He was despatched to Perth as clerk of the course a year later, and found the business "in a pretty parlous state". He says: "I think my own attitude was that work had to be fun as well, and that has rubbed off on what I started here - let's make it fun for everyone. I was fortunate to have been at the grass roots of the industry, literally, so I knew what horses and trainers and jockeys all wanted when they came to Perth and was quite quickly able to put some improvements in place. That would attract more runners, and runners drive every income stream. Once you are getting horses you are getting more people, more interest from sponsors and the whole thing drives."

Average race fields went up from seven to 11 as prize money increased, attracting more owners. The reward system is run by the horse-racing levy board, which distributes betting income to courses based on the amounts they can raise themselves.

"I quickly saw that if we could raise prize money by putting more on ourselves and attracting sponsors, we would get more back from the levy board," Mr Morshead explains.

In 1989 he introduced the three-day April Festival, as a draw at the end of the traditional jump-racing season for trainers and jockeys who are then "in party mood".

In 1994 the racecourse became, like Musselburgh, an autonomous business, though still run as a not-for-profit club. Mr Morshead's steering saw Perth moved up the racecourse money league from 37th to 17th, raising the profile of racing in Perth and spreading the economic benefits to the surrounding area.

A levy board loan helped fund a new £2.1 million hospitality stand, which helped sponsorship rise dramatically, hitting £220,000 a year by the time of the financial crisis. It has since halved, hit by the big squeeze on corporate budgets, the latest casualty being local employer Aviva's recent withdrawal from sponsoring the flagship Gold Cup event in June.

"It shows the climate is still there," Mr Morshead says. "The culture is different... companies are spending money on staff days out and building morale rather than entertaining clients. It is just another challenge."

He goes on: "We have to make a big commitment to prize money. We need that to make sure owners are rewarded for their own investment and we have to play our part, but having the ability then to build capital projects on the back of this increased spend is very testing with a drop in income from sponsorship and to a degree hospitality."

The former jockey has nevertheless ensured major investment has gone into course maintenance and "manicured turf", to keep trainers happy, along with new parade ring, enclosure and other facilities.

The racecourse works closely with the local council and helped its campaign for city status, and Mr Morshead chairs the Perthshire Business Tourism Group. "The hotels do a roaring trade for the two or three days of each meeting, the knock-on benefits have been huge and I enjoy witnessing that development," he says. Race days have gone up from 10 to 16, spread across nine meetings, and the big Sunday fixtures attract 10,000 people to the green pastures of Scone, where the palace turrets can be spied from the stands.

"More fixtures means hopefully more horses and trainers in the area," the manager says. "Nearly 30% of our horses come from Ireland, which provides another bit of colour... but local trainers have been very successful over the past few years."

Horses come too from Wales and southern England, and a purpose-built trainers and owners bar helps "make them feel special", he says.

The modern stand, which doubles as a meeting and conference venue in a rural setting, has enabled Perth Racecourse to grow its non-racing business substantially, Mr Morshead says. "It is a very competitive market, margins aren't very big, but if nothing else it pays for staff costs over the winter and keeps the show on the road."

Levy board money has been under pressure, as betting money has diverted into football and other entertainment, squeezing horse-racing's share.

"We are getting less than we were," Mr Morshead says. "But that makes it all the more important that we provide entertainment here and get people to come and have fun at Perth races. If you become too reliant on the betting industry, and don't run a successful business yourself, you are not going to win the battle."