It had started as a typically peaceful evening on Linlithgow’s High Street, overlooked by the ancient royal palace where Mary, Queen of Scots was born, and kings took shelter from deadly rivals.

Before long, however, the quiet would be shattered, with the arrival of a grey-haired, green-fingered ‘hit squad’.

Armed with cutting gear, brute force and begonias, they surrounded an unsightly defunct telephone box.

Over three hours, metal crunched as panels were ripped out and glass removed. Finally, where once stood the kind of eyesore found in many towns emerged a blaze of summer colours and perhaps the most unusual planter for miles around.

From inside, spiky, sword-like phormium erupted from a bed of brilliant blood red, pastel pink and creamy white begonias; outside, creepers spilled over the edges of the box, hugging the squad’s name plate: Ex-tinguishers, it reads.

The group of former firefighters behind the transformation of an unsightly phone box to unusual planter are just one element of an impressive community blitz which has seen almost the entire centre of the West Lothian town covered in a blaze of brilliant colour.

Armed with trowels, shovels, spades and a burning desire to be Britain’s blooming best, few patches of spare ground have been left untouched.

Once bare patches on the fringes of parks, pavements and beside the town’s busy railway station are now colourful mini meadows of wild ox-eye daisies, red campion, thistles, gowans and buttercups.

Hanging baskets stuffed with jewel-like colours dangle from posts and planters are dotted around the town; countless whisky barrels - once put to a different use at the now long-gone distillery – overflow with blooms.

Grass verges have been carefully trimmed, weeds plucked from between paving slabs and there’s a sense that if they could, the passionate ‘Black Bitches’ – the name given to Linlithgow folk – would get down on hands and knees to polish the pavements.

In fact, in some cases, they almost have: an immense community effort has seen everyone from guides and scouts to the retired firefighters, and even an extremely energetic 80-year-old litter picker who has almost single-handedly brushed clean the High Street, weed, plant and dead-head for Britain.

It's all in preparation for next Friday, when judges from the UK’s biggest town gardening competition, Britain in Bloom, roll in to view the town’s 124 hanging baskets, 95 planters and barrels, 35 flowerbeds and countless floral themed displays in shop windows, front gardens and outside businesses.

Launched in the 1960s and once hotly contested by local authorities intent on showcasing the quality of their gardeners, former Britain in Bloom winners in the past have included Aberdeen, Edinburgh and Falkland in Fife.

Cuts to council spending, however, have seen the competition switch in recent years to become a celebration of community power and what can be achieved by locals joining forces to improve their own little patch.

This year just two Scottish towns Linlithgow and North Berwick in East Lothian, are among 46 communities in the final stages of the competition.

In Linlithgow, the achievement is particularly impressive: from raising the £25,000 to pay for the flowers and compost to sweeping the streets has been almost entirely their own work.

“The community effort extends to everything from tending all the public flower beds, planters and hanging baskets to raising all the funds from the community - mainly through sponsorship - to cover the cost of the plants and even to pay for getting the grass cut around our floral displays,” says Ron Smith, Convener of Burgh Beautiful Linlithgow, the group leading the effort.

It's not all flowers, he adds. Locals take care of wildflower areas, several orchards, a small wetland and natural rockery and have created a new woodland and established an arboretum with multiple tree species.

While in all, around 100 volunteers have put in at least 16,000 hours of work, handling more than 20,000 plants for the summer displays and, as the seasons change, a further 8,400 plants for winter and spring.

Not all has gone exactly to plan. Three weeks ago, plants in hanging baskets packed with eco-friendly peat-free compost, turned a disturbing shade of yellow.

“All the baskets were affected,” adds Ron.

In a gamble that could easily have destroyed all their hopes, gallons of sequestrated iron was poured into rapidly declining baskets. To everyone’s delight, the ‘transfusion’ appears to have worked.

That, plus a last gasp rallying of the troops for a street clean up needed, says Ron, because the local authority’s version didn’t quite pass muster, and all that remains is the judging.

“This is a bit like the Chelsea Flower show for towns,” he adds. “The plus point is that the community is coming together to improve conditions in our town, not only for the Britain in Bloom judges, but mainly for residents and visitors, all helping to improve civic pride.”

Likewise, around an hour away, the seaside town of North Berwick is gripped by a similar floral frenzy.

It is among five finalists in the ‘Coastal’ category – the others, in Jersey, Guernsey, the Isle of Wight and Devon may well benefit from slightly more temperate climes.

“North Berwick is looking great, we’ve had so much help from so many people, it’s been amazing,” says Libby Morris, Chairman of North Berwick in Bloom, which has helped co-ordinate armies of green-fingered helpers to furiously plant, weed and prune.

“We’re quite a small community,” she adds, “and we all seem to know each other. It’s easy to say ‘that needs done or we’ll check this’ and it all comes together.”

When judges arrive in a few weeks’ time, they will find planters and hanging baskets in their prime, the police station bedecked in Jubilee colours of red, white and blue, and wooden tubs overflowing with herbs, vegetables and medicinal plants.

The town’s floral clock, planted by East Lothian Council in quirky skull and crossbones design, reflects the town’s Year of Stories theme, while throughout the town centre old bikes have been painted and baskets filled with blooms, overturned rowing boats overflow with flowers and patches of wildflowers buzz with pollinators.

Should both East and West Lothian towns win their categories, they could go head-to-head for Britain in Bloom’s overall gold medal – more than simply the prestige of beating 16,000 entrants, the title carries a huge tourism boost.

But, insists Libby, there is no bitter rivalry between Scotland’s last towns standing.

“We would be delighted if they won,” she adds. “We’ve been to see what they are doing, and we’ll celebrate with them if they win.”