It was a perfectly normal night at Kelburn Castle in Ayrshire. The young Viscount Kelburn worked in his office after returning home from drinks with friends. His father, the 10th Earl of Glasgow, was asleep in the north wing.

Kelburn Castle, which overlooks the Firth of Clyde close to Largs, is considered to be the oldest castle in Scotland continuously inhabited by one family. But more than 700 years of history was put at risk in the early hours of yesterday morning when a smouldering electrical fault quickly turned into a fullscale fire.

The Earl, 69, yesterday spoke of the father and son attempt to tackle the blaze before firefighters arrived on the scene.

Still in his pyjamas and laden with buckets of water, he was engulfed by a wall of smoke as he opened the door to the billiards room shortly after 1.30am.

He ran to get a napkin from the nearby dining room to cover his mouth but the conditions were too extreme for him to make any difference. At this point, the Earl and 30-year-old David Boyle, Viscount Kelburn, could not see the flames which were gathering pace in the roof - they could only hear them.

The Earl said: "We had a naive idea of throwing buckets of water into the fire so we got the water from the kitchen and rushed up there. When we opened the door all you could see was smoke.

"It was suffocating. I covered my mouth but it was no use. It was clear it was a bad idea, there was no point throwing water into a roomful of smoke. We went outside and sat on the lawn and waited for the fire brigade.

"We could see smoke coming out of the roof, then that turned to flames. We were very nervous at that time, extremely concerned. The fire brigade had not arrived at that point and we did not know how bad it was."

Around 25 firefighters from Largs and Ardrossan attended the blaze, which was finally extinguished around 7.20am. Firefighters had to enter the castle for a second time after it emerged that the fire was still active in part of the roof.

The Earl said he was "relieved" that the blaze had been contained to one part of the castle.

He praised the fire services for their work, and thanked them for making efforts to remove a number of family portraits from the dining room, some of them painted by Sir Henry Raeburn. Part of the roof will have to be replaced following the fire and "a very good" carpet from the dining room has been damaged by the water used to calm the blaze.

The Earl said the fire was started by an electrical fault in an immersion switch in one of two bathrooms adjoining the billiards room.

He failed to wake as the fire alarm sounded across the castle and it was his son David who stirred his father as he slept in a room close to the seat of the fire.

Viscount Kelburn, an architectural designer, said: "I had been out visiting friends and was sitting in my office when the fire alarm went off. We have been having a lot of problems with our fire alarm system of late, sometimes it would go off three times a night, but I always check, even if I think it is just a false alarm "I went up to the billiards room and opened the door. I couldn't see the flames at that point, but I could hear them. Then I went to wake my dad and tell him we had a fire.

"The fire brigade were amazing. We are both alive and the house has not burned down. I think we are incredibly fortunate."

Kelburn is thought to be the oldest castle in Scotland to have been continuously inhabited by the same family. The present 10th Earl of Glasgow and his wife, Isabel, started Kelburn Country Centre in 1977, opening most of Kelburn's grounds and gardens to the public.

The dining room is normally used for private functions and the Earl said yesterday that it should be reopened and back in use within a month.