A TIME must come for Scotland to set about constructing a diplomatic service, based on realistic principles and so equal to the practical tasks of reforging relations with the world beyond Britain.

There will be plum embassies in Washington, Paris, Brussels, perhaps even London, but there will also be a presence in a good few disagreeable capitals.

I predict that one especially awkward post will be Beijing. Hardly anybody in Scotland seems to be aware that Scots count in Chinese popular mythology as rank villains and violent savages, altogether the most barbarous of western races.

Many other countries find they have problems in getting on a friendly footing with China. Ours could face the most difficulty of all.

This stems from the 19th century. Then the richest of Scots, the heroin smugglers William Jardine and James Matheson, whom I have written about before, brought about the collapse of the older Chinese economy, stable but stagnant for hundreds of years, pursuing a basic purpose of keeping foreigners out.

Not only did Jardine and Matheson actually get in, but they smuggled drugs with them. As a result, a large part of the native population became addicted to narcotics and useless for wider economic purposes.

READ MORE: Energy bills in Scotland set to rise to finance England’s nuclear power plants

The problem did not end with the UK’s victory in the First Opium War that it fought against China in 1839-42. This was meant to open all trade and it did (opium being just the most profitable). Chinese officials continued trying to evade the policy, however, even though it now rested on international treaty.

The Second Opium War was fought 1856–60. Modern military technology brought easy victory over the Chinese, with the result that their government was forced to sign a whole row of unequal treaties to grant favourable tariffs, trade concessions, reparations and territory.

They made China open specified treaty ports (Shanghai the biggest) to handle all trade with the foreign powers. Finally, China handed over the sovereignty of Hong Kong to the UK. Jardine and Matheson settled comfortably into the new emporium.

The man on the spot directing this major operation was another son of Scotland, James Bruce, 8th Earl of Elgin (below). In him the Prime Minister at home, Lord Palmerston, placed his personal confidence.

They were old pals from Oxford University. The earl was also son and heir of his father Thomas, who as a young man had removed the marbles from the Parthenon of Athens and transferred them to the British Museum in London.

This did not, however, enrich the family. On the contrary, the expense brought ruin. From then on, they always had to work for the UK Government to make a living. This was why the 8th earl needed a job in China.

In 1857 he was put in charge of opening up western trade in the Far East. Troubles rumbled on because of the reluctance of the Chinese authorities to follow the liberalising measures they had been forced to sign up to. The Chinese customs still boarded foreign ships and mistreated crewmen. The British sometimes retaliated with a volley of cannon balls at Canton.

Palmerston was determined the Chinese should be properly punished and saw Elgin, now sent out with a big enough naval and military force, as his instrument of vengeance. The earl accepted the commission, but in private was deeply troubled by it. He wrote to his wife: “War is a hateful business. The more one sees of it, the more one detests it.”

The National: James Bruce, the 8th Earl of ElginJames Bruce, the 8th Earl of Elgin (Image: James Bruce)

Even now anxious to mediate, but failing to wring any concessions from the governor of Canton, the earl finally gave the order to attack.

Over more than 24 hours, on December 28 and 29, the British bombarded the city, and then occupied it. The governor was among the prisoners. “I never felt so ashamed of myself in my life,” Elgin said.

After Canton, he turned to Shanghai, for which he proposed to open talks with the Chinese government in Beijing. There followed months of tedious negotiation, during which the imperial officials deployed their only real weapons, prevarication and promises, with great skill.

Elgin himself, much to his own distaste, played the part of the “uncontrollably fierce barbarian”, as he was dubbed in Mandarin.

The two sides signed the Treaty of Tientsin on June 26, 1858. Elgin fuelled his own nation’s pride and returned a hero. He was praised in the House of Lords and fêted throughout the country. In Scotland he was elected rector of the University of Glasgow.

Events in China were still not encouraging. A defeat followed in June 1859 at the forts guarding the maritime approaches to Beijing. Elgin’s brother, diplomat Frederick Bruce, tried without success to force them. In the UK there was outrage.

A mere 11 months after getting back from “this abominable East”, Elgin was asked to return and finish the job. Now he was to lead an army of 30,000 men and march straight to Beijing. He accepted the mission, though he felt inwardly sick at the whole prospect.

The journey to China proved long and hazardous, with Elgin shipwrecked in the Indian Ocean. He reached Hong Kong in June 1860 and met up with his brother Frederick in Shanghai before moving north to attack the imperial capital.

Within it power struggles raged, different factions trying also to contact the British and see if some deal might be struck. Others, by contrast, captured British sailors and mistreated them. In one case, there were only five survivors out of a party of 30.

To back up his harassment, Elgin sent out a pipe band of kilted guardsmen to remind the Chinese how fearful real Scotsmen could look and sound. At the gates of Beijing the earl paused to see if the imperial court might make a serious effort to negotiate with him.

His only real alternative was to exact huge casualties by fighting his way into the city. He preferred to strike not at the innocent people but at the emperor in person.

On October 18, 1860, Elgin had the Summer Palace put to the torch. Rising from the edge of the city, it had been built by emperors as a place of delight with parks and lakes to show off exquisite works of art in tranquil seclusion from the real world.

A great pall of smoke hung over Beijing as the palace burned and the barbarians helped themselves to porcelain, silks and ancient books.

Six days later, Elgin and his army entered Beijing. Frederick Bruce was presented to the Chinese government as Queen Victoria’s representative. Leaving an army behind him, the earl departed the Orient for the last time.

The Chinese have ever since preserved the ruins of the Summer Palace to remind themselves of the essential difference between East and West. Parties of schoolchildren come to be instructed. Videos of swirling kilts and skirling pipes are designed to bring them out in a cold sweat.

To explain this away will be a daunting task for Scotland’s returning diplomats of the future.