Titian's Diana and Callisto has been saved for the nation after a £45m ($71.7m) deal was agreed with owner the Duke of Sutherland.
The "supremely important" oil painting was bought with the help of £25m ($39.9m) from the National Gallery after a lengthy fundraising campaign.
Along with partners National Galleries of Scotland, they also saved sister piece Diana and Actaeon in 2009.
Both galleries hailed the "exceptional generosity" of donors.
The two pieces will be displayed together on a rotating basis in London and Edinburgh.
Titian's Diana and Actaeon was purchased three years ago for £50m ($79.7m). The institutions had originally been given until the end of the year to raise money for the second work.
National Gallery director Dr Nicholas Penny said: "For more than 100 years, these two great paintings by Titian have been regarded as pre-eminent among the masterpieces in private hands in the UK.
"We have been able to secure both of them for the public, in a period of economic hardship, because of the esteem and affection that both institutions have enjoyed for many decades."
The BBC's arts editor Will Gompertz said seeing the paintings split up "after nearly half a millennium of being together would have been a huge loss in terms of art history and the British public's ability to enjoy these two great paintings".
He added: "For the UK's national galleries to have seen Diana and Callisto leave the country would be like Italy waving goodbye to Michelangelo's David."
The companion pieces were produced in the 1500s by the Renaissance artist and are considered to be among his greatest works.
They are among six large-scale works, painted for Philip II of Spain, that were inspired by the Roman poet Ovid.
Diana and Callisto depicts a nymph, impregnated by the god Jupiter, being expelled by the goddess.
The two Titian paintings form part of the Duke of Sutherland's Bridgewater Collection - featuring works by Raphael, Rembrandt and Poussin - which has been on loan to the National Galleries of Scotland since 1945.
The galleries said the Duke had offered the two paintings at prices "significantly lower than their market value" - estimated to be around a half to a third of what they would be worth on the open market.
National Gallery trustees allocated £25m from its charitable reserves, principally gained from legacies left by members of the public over the past century.
The rest of the money came from the Heritage Lottery Fund, the Art Fund and individual donors and trusts.
Unlike the public appeal the galleries launched to save Diana and Actaeon, the two galleries said they decided against asking for a government grant or public help to raise money for the second painting "during such difficult economic times".
"We have used these reserves before, but never on this scale, and no purchase ever made by the National Gallery has begun to approach the magnitude of this acquisition," Dr Penny said.
He added that the gallery had "very little" of its £32m reserve left for future acquisitions - as much of the remainder has been bequeathed for specific uses, such as education.
Dr Penny said he anticipated being asked why a UK national gallery was spending such large sums to acquire works by a foreign painter.
"If you lined up [British artists] Gainsborough, Turner and Constable, not only would they feel that this was a very great day but they would also admit they would not have been the artists they were had it not been for Titian.
"We do have quite a few [works by Titian]. But that to me is a question rather similar to, 'there is one play by Shakespeare, do you really need any other ones?'"
John Leighton, director-general of the National Galleries of Scotland, said the risk that the money might not have been raised and the painting would be sold overseas was "a very real one".
"For us in Scotland this has always been about a battle to hold on to what I would describe as our triple AAA status as a great art collection and one of the great European art galleries," he said.
"From today these great paintings belong to the British public and we could not be more thrilled that they will be available for the enjoyment, the education, and the inspiration for generations to come," he added.
Diana and Callisto will be displayed in London for 18 months from Thursday.
It will be joined by Diana and Actaeon - currently on a regional tour - in July. Both will then go on show in Scotland and be the centrepiece of a special display in Edinburgh to coincide with the 2014 Commonwealth Games.