Fortunately for Simpson and for the University, the appointment did not lie in the gift of the professors, but was entirely in the hands of the Town Council, comprising thirty-three citizens.

Such an election was always a matter of keen interest to the inhabitants of Edinburgh, and each candidate brought all the direct and indirect influence within his power to bear on every councillor whom he could reach. The Professors in the various faculties had no doubt great influence; they openly canvassed for the candidate they favoured, and did not hesitate to decry those they did not approve of. Shortsighted 61 as this professorial opposition was, it proved no small difficulty in Simpson’s way. Foremost amongst his opponents was Syme, who commenced a long feud with him by supporting his chief rival, Dr. Kennedy; “I feel no hesitation in stating,” he wrote purposely for publication, “that of all the candidates in the field, he (Kennedy) is out of all question, according to my judgment, the one that ought to be elected.” Sir Charles Bell was equally emphatic, and characterised Simpson’s testimonials, in a note which Kennedy circulated, as given by “good-natured people merely to do a civil thing to a friend”—which was his mode of describing the declarations of some of the most eminent men of the day.

Each candidate also brought political influence to bear, and Whig and Tory grew agitated as the contest became keener. Simpson seems to have thought that both political parties were in opposition to him, but he certainly had the strong support of Ritchie of Scotsman fame, and the no less important influence of Mr. Duncan Maclaren.

When writing to ask Mr. Grindlay for his daughter’s hand, Simpson candidly confessed his pecuniary position at the time. He referred to a debt of £200 already owing to his brother Sandy, and added:—“Again he gave me a bill for £120 to assist me in furnishing my house. This has been renewed and becomes due in January. He hopes to be able to pay it, and I fondly imagined I would have 62 paid the half, but this canvass has involved me in new difficulties, and besides, I have endeavoured to assist my sister to go out to Van Diemen’s Land. As it is now I am self-sufficient enough to think that I am as well off as regards station in my profession as any who started here in the race of life with me. They have all, I believe, been aided by friends or by private wealth. They have almost all been fortunate enough to have the protection of a father’s roof during the first years of practice. I have had no such advantages, but have worked and stood alone. I have accumulated for myself a library and museum, worth £200 at least, amidst these difficulties. These I have won by my pen and my lancet, and these are my only fortune. And now could you trust her future happiness to me under such circumstances? I did not intend to ask her hand at present. I fondly hoped I might have first cleared myself of my debts.”

Grindlay did not hesitate, but willingly gave his daughter, as she was willingly given, for better or worse.

The expenses of the canvass amounted to about £500, an amazingly large sum; he spared no expense in printing and posting his testimonials and letters to every one who had any influence with the Council, however small; but taking into consideration the cost of printing and postage in 1839, it is difficult to realise how the money was expended. His aim was to make known his scientific attainments, powers 63 as a teacher, and personal qualifications which he felt, if duly realised, would outweigh the disadvantages of his youth and comparative inexperience. His testimonials spoke in strong terms of his abilities and characteristics; they were a good deal more numerous and elaborate than is customary to-day, but Kennedy’s also made a fat volume of 150 octavo pages.

As the day of election drew near the excitement amongst citizens, professors, and students grew intense. Of the five candidates in the field, three, including his former teacher Thatcher, speedily fell out of the running. Dr. Evory Kennedy, of Dublin, and Simpson stood face to face as rivals. Kennedy was no mean opponent, and his supporters honestly considered him the better man of the two; his attainments certainly merited warm support. The prophets foretold a close struggle, and the event proved them correct. So keen was public interest that when a report was circulated that Kennedy was a bad lecturer, his friends brought him over from Dublin a few days before the election, hired a public room, and made him lecture to a crowded and enthusiastic audience to dispel that illusion. In spite of this the popular vote was decidedly in Simpson’s favour; if the citizens had had votes Simpson would have been returned at the head of the poll by a large majority.

On Tuesday, February 4, 1840, at a Council meeting, at which all thirty-three members were present, the Provost himself proposed Kennedy, 64 while Baillie Ramsay proposed Simpson. The result was awaited with breathless suspense, the chamber being crowded by anxious spectators. Simpson’s enthusiasm had infected his supporters; he had kindled the first sparks of that enthusiastic affection with which the citizens of Edinburgh ever after regarded him; when his triumph, by the narrowest majority, was announced, the cheers resounded loud and long.

The same evening he was able to write to Liverpool:—

“1, Dean Terrace.

“I was this day elected Professor. My opponent had sixteen and I had seventeen votes. All the political influence of both the leading Whigs and Tories here was employed against me; but never mind, I have got the chair in despite of them, Professors and all. Jessie’s honeymoon and mine is to commence to-morrow.”