The remarkable transformation of an Ayrshire castle by an English developer has shaken off the effects of an old curse on the property. The restoration of the thirteenth century Sundrum Castle is now complete. Located four miles from Ayr, the historic building stands within an 87-acre estate which has been transformed over the last five years with the aid of Historic Scotland.

A combination of new-build housing, designed in a traditional courtyard style, and restoration of original buildings has created a total of 26 houses. Only two houses remain available through Cluttons, sales agents for the developers.

The larger is the magnificent Hamilton Wing, a Georgian addition to the original castle which has large rooms built to beautiful proportions. It has three reception rooms, a large hall with an impressive staircase, four bedrooms and three bathrooms. Cluttons is seeking offers over #275,000.

The other is a house in the Courtyard with two reception rooms, four bedrooms and two bathrooms at offers over #120,000.

The well wooded private country estate has a tennis court, woodland walks, river and waterfall.

Sundrum has a long and colourful history. Originally built by Sir Duncan Wallace it was the home of the Cathcart family for almost four centuries before being sold to John Hamilton in 1762.

The Hamilton family transformed the castle over the next 150 years with wealth generated in their Jamaican estates.

This century, Sundrum Castle became a hotel and flourished until 1984, after which it passed through several hands and became very dilapidated. It appeared there was truth in the old rhyming curse:

Sundrum shall sink,

Auchincruive shall fa',

And the name of Cathcart

Shall in time wear awa'

In 1991 the estate was purchased by Salopian Estates Ltd. and the Castle and its related buildings have since been totally renovated.

The first phase involved the renovation of the Castle Mews to provide 13 individual homes. The second phase saw the construction of a nine-house Courtyard in keeping with the existing estate buildings, landscape and atmosphere.

The third and most challenging phase, the restoration and conversion of the castle itself by dividing it vertically into three substantial residences is now complete. The centrepiece is the ancient Wallace Tower with a main hall featuring a double vaulted ceiling, the other wings comprise the Georgian proportioned Hamilton Wing and the light and spacious nineteenth-century Coats House.

The Wallace Tower and the Coats House have recently been sold.

The restoration of the estate has been a remarkable achievement and has now won an award from the Association for the Protection of Rural Scotland.

Bob Cherry, of Cluttons' Ayr office, says: ''Sundrum has indeed been fortunate and there will be little truth in the old rhyme for the next few hundred years. In addition to the Courtyard house and the Castle Wing, there are a number of individual house plots in lovely wooded positions with detailed planning permission at prices starting from #50,000.''