Image copyright Bank of England

Computer pioneer and codebreaker Alan Turing will feature on the new design of the Bank of England's £50 note.

He is celebrated for his code-cracking work that proved vital to the Allies in World War Two.

The £50 note will be the last of the Bank of England collection to switch from paper to polymer when it enters circulation by the end of 2021.

The note was once described as the "currency of corrupt elites" and is the least used in daily transactions.

However, there are still 344 million £50 notes in circulation, with a combined value of £17.2bn, according to the Bank of England's banknote circulation figures.

"Alan Turing was an outstanding mathematician whose work has had an enormous impact on how we live today," said Bank of England governor Mark Carney.

Media playback is unsupported on your device Media caption Mark Carney praises Alan Turing's achievements

"As the father of computer science and artificial intelligence, as well as a war hero, Alan Turing's contributions were far-ranging and path breaking. Turing is a giant on whose shoulders so many now stand."

Why was Turing chosen?

The work of Alan Turing, who was educated in Sherborne, Dorset, helped accelerate Allied efforts to read German Naval messages enciphered with the Enigma machine.

Less celebrated is the pivotal role he played in the development of early computers, first at the National Physical Laboratory and later at the University of Manchester.

In 2013, he was given a posthumous royal pardon for his 1952 conviction for gross indecency following which he was chemically castrated. He had been arrested after having an affair with a 19-year-old Manchester man.

The Bank said his legacy continued to have an impact on science and society today.

Analysis: Paul Rincon, BBC News website science editor

Alan Turing played an absolutely crucial role in Allied victories through his codebreaking work. He is also considered a towering figure in the development of computing.

BBC copyright Alan Turing 1912 – 1954 1912 Alan Mathison Turing was born in West London

1936 Produced “On Computable Numbers”, aged 24

1952 Convicted of gross indecency for his relationship with a man

2013 Received royal pardon for the conviction Source: BBC

Yet for decades, the idea of Turing being featured on a banknote seemed impossible. This will be seen as an attempt to signal how much has changed in society following the long, ultimately successful campaign to pardon Turing of his 1952 conviction - under contemporary laws - for having a homosexual relationship.

His work helped cement the concept of the algorithm - the set of instructions used to perform computations - that are at the heart of our relationship with computers today. He was also a pioneer in the field of artificial intelligence: one of his best known achievements in this field is the Turing Test, which aims to measure whether a machine is "intelligent".

Former Manchester MP and gay rights campaigner John Leech, who campaigned for Alan Turing's pardon, said: "This is a fitting and welcome tribute to a true Manchester hero.

"But more importantly I hope it will serve as a stark and rightfully painful reminder of what we lost in Turing, and what we risk when we allow that kind of hateful ideology to win."

The Bank asked the public to offer suggestions for the scientist whose portrait should appear on the £50 note. In six weeks, the Bank received 227,299 nominations covering 989 eligible scientists.

A shortlist was drawn up by a committee, including experts from the field of science, before the governor made the final decision.

Image copyright Getty Images Image caption Rosalind Franklin, Stephen Hawking and Ada Lovelace all appeared on the shortlist

The shortlisted characters, or pairs of characters, considered were: Mary Anning, Paul Dirac, Rosalind Franklin, William Herschel and Caroline Herschel, Dorothy Hodgkin, Ada Lovelace and Charles Babbage, Stephen Hawking, James Clerk Maxwell, Srinivasa Ramanujan, Ernest Rutherford, Frederick Sanger and Alan Turing.

The debate over representation on the Bank's notes could resurface after this decision.

Jane Austen will continue to be the only woman, apart from the Queen, whose image will be seen on the four notes.

There was also a campaign calling for a historic figure from a black and ethnic minority background (BAME) to feature on the new £50 note.

In response to Maidstone MP Helen Grant, who raised the issue in Parliament, the governor said: "The Bank will properly consider all protected characteristics, and seek to represent on its banknotes characters reflecting the diversity of British society, its culture and its values."

How will the banknote change?

Steam engine pioneers James Watt and Matthew Boulton appear on the current £50 note, issued in 2011.

The new £50 Turing note will enter circulation by the end of 2021, Mr Carney announced at the Science and Industry Museum in Manchester. It will feature:

A photo of Turing taken in 1951 by Elliott and Fry, and part of the National Portrait Gallery's collection

A table and mathematical formulae from Turing's 1936 paper "On Computable Numbers, with an application to the Entscheidungsproblem" - foundational for computer science

The Automatic Computing Engine (ACE) Pilot Machine - the trial model of Turing's design and one of the first electronic stored-program digital computers

Technical drawings for the British Bombe, the machine specified by Turing and one of the primary tools used to break Enigma-enciphered messages

A quote from Alan Turing, given in an interview to The Times newspaper on 11 June 1949: "This is only a foretaste of what is to come, and only the shadow of what is going to be"

His signature from the visitor's book at Bletchley Park in 1947

Ticker tape depicting Alan Turing's birth date (23 June 1912) in binary code. The concept of a machine fed by binary tape featured in Turing's 1936 paper.

Current Bank of England £5 and £10 notes are plastic - which the Bank says are more durable, secure and harder to forge. The next version of the £20, to enter circulation next year, will also be made of the same polymer.

So, the £50 note will be the last of the Bank's collection to change.

Why do we even have a £50 note?

In recent years, there have been doubts that the £50 note would continue to exist at all.

Fears that the largest denomination note was widely used by criminals and rarely for ordinary purchases prompted a government-led discussion on whether to abolish it.

The £50 note was described by Peter Sands, former chief executive of Standard Chartered bank, as the "currency of corrupt elites, of crime of all sorts and of tax evasion".

There has also been considerable discussion over the future of cash in the UK, as cards and digital payments accelerate and the use of notes and coins declines.

Nevertheless, in October, ministers announced plans for a new version of the note, to be printed in the UK.

What about other banknotes?

Polymer £5 and £10 notes are already in circulation, while a £20 design will be issued in 2020.

Jane Austen was chosen to appear on the plastic £10 note after a campaign to represent women other than the Queen on English notes.

Image copyright Getty Images

In 2015, a total of 30,000 people nominated 590 famous visual artists for the £20 note, before JMW Turner was selected with the help of focus groups. He will replace economist Adam Smith on the note in 2020.

Sir Winston Churchill appears on the polymer £5 note.

Image copyright PA

A host of different people have appeared on banknotes issued in Scotland and Northern Ireland. Ulster Bank's vertical £5 and £10 notes entered circulation in Northern Ireland in February.