The portrait is Britain's earliest known example of a freed African slave
A rare painting could be lost to the nation if sufficient funds to secure its future are not found in time, says the National Portrait Gallery.
The 18th century portrait of Ayuba Diallo, a freed African slave in Britain, only recently came to light.
Last month the gallery launched a public appeal to prevent it from leaving the country.
A further £60,000 has yet to be raised before the end of August deadline.
The painting, by William Hoare of Bath, has never been seen in public before.
It offers a link to some of the otherwise missing black and Islamic histories in its Collection, says the gallery.
Diallo, born into a family of Muslim clerics in West Africa, was taken into slavery and sent to work on a plantation in America.
He managed to arrive in London in 1733 where he was introduced at Court and bought out of slavery by public subscription.
Appeal for support
The gallery, founded to collect portraits of famous British men and women, contains over 160,000 items from the 16th century to the present day.
Asked about the significance of the Diallo portrait, director Sandy Nairne said, "London was going through a period of enlightenment in the 1700s, with Sir Hans Soane founding the British Museum.
"So these things were going on and the portrait becomes part of this."
In July the gallery launched an appeal for support to acquire Hoare's painting to save it from export.
Gallery director Sandy Nairne talks about the Diallo portrait and appeal
A final sum of £100,000 was required after a grant from the Heritage Lottery Fund and the Art Fund.
With two weeks left to the end of August deadline, the gallery's latest figures reveal a shortfall of £60,000.
Now it is appealing for the public to step in and make a donation through its website.
Speaking to BBC London Mr Nairne said, "Technically, the people who've bought it can legitimately export the painting from the country.
"We have to hope we can get the extra help we need before the deadline."