The only known painting of nurse and Crimean War heroine Mary Seacole is to remain on public show after being bought for £130,000.
The National Portrait Gallery bought the painting with the help of a £96,200 grant from The Heritage Lottery Fund (HLF) and other donations.
The painting was found at a car boot sale and has been on loan to the gallery since 2004.
Jamaican-born Ms Seacole was painted by London artist Albert Challen in 1869.
The portrait depicts Ms Seacole wearing a red neckerchief and the three medals which she was awarded for her service.
It was discovered in July 2003 after being bought at a boot sale in Burford, north Oxfordshire.
The painting was hidden behind a framed print and then spotted by a dealer who noticed an inscription on the back by the artist, reading ACC.
The dealer sold the portrait at a local auction in Warwickshire and it was later acquired by historian Helen Rappaport - an expert on Mary Seacole - who recognised the identity of the sitter, bought the portrait and took it to the National Portrait Gallery for examination.
Ms Rappaport described the find as a "complete fluke".
"I saw an emailed image and immediately knew it was her. By a long and torturous route I tracked down the dealer and managed to buy it because I wanted to make sure it didn't disappear," she said.
"I contacted the National Portrait Gallery to get it authenticated. I left it with them and meanwhile went in search of the artist. I had not a single shred of information about him.
"I left it with the gallery as I didn't want it to disappear into a private collection or abroad, as historically it's a hugely significant portrait."
Seacole, who rivalled Florence Nightingale for her feats in the Crimean War, was the daughter of a Scottish soldier and Jamaican mother.
The HLF said she was a nurse, adventurer and writer whose bravery, compassion and determination mark her as an exceptional figure in Victorian society.
Wesley Kerr, chairman of the HLF Committee for London, said: "This is a moving and powerful painting that brings to life the courage, compassion and determination of an important figure in British history.
"As a woman and as a West Indian of mixed race she broke many barriers to make a huge contribution to Victorian society.
"Mary Seacole was an inspirational figure and a great humanitarian.
"At HLF we are thrilled to award a grant to the National Portrait Gallery, enabling it to to keep Challen's fine portrait of Seacole on permanent display for present and future generations."
Sandy Nairne, director of the National Portrait Gallery, added: "Mary Seacole is an inspiring figure and I am delighted that this painted portrait can now join the National Portrait Gallery Collection."