The Procession to Calvary, completed in 1602, will remain on show at Nostell Priory in West Yorkshire.
The painting had been put up for sale for £2.7m. A campaign by The Art Fund and National Trust raised £1.7m.
The National Heritage Memorial Fund, which aims to save key historic items, has now stepped in with the final £1m.
The painting depicts Christ carrying the cross on his way to crucifixion and has hung at Nostell Priory, a stately home near Wakefield, for 200 years.
The priory is the family home of Lord St Oswald, who put it up for sale to pay for the restoration of the estate.
He had said he would put it up for auction if the target was not reached by Christmas.
Members of the public donated £680,000 to the campaign, with almost £510,000 coming from trusts and foundations, while The Art Fund gave a further £500,000.
Art Fund director Dr Stephen Deuchar said: "Considering the economic climate, this has been a hugely challenging campaign and we are enormously grateful to all our members and supporters who have given so generously.
"Working with the National Trust has been a very fruitful experience, pooling our resources to pull out all the stops and save this remarkable painting for Nostell Priory and its visitors."
Dame Jenny Abramsky, chair of the National Heritage Memorial Fund, said:  "The overwhelming public support to help secure this stunning painting has been an inspiration.
"Individual giving combined with ongoing support from government funds such as the National Heritage Memorial Fund will play an increasingly important role in securing our most precious heritage."
The fund's money comes from the Treasury and is intended to be the last resort for saving items of importance to the UK's national heritage.
It has received £10m a year since 2007, but its grant will be halved from this year as a result of government cuts.

Cardiff North MP Jonathan Evans said it was "a tragedy" there was no agreement on who should chair the inquiry, set up after claims of paedophiles operating in Westminster in the 1980s.
The Conservative MP said cases should be investigated by the police first.
Child abuse survivors have urged the government to scrap the inquiry.
Instead, they want it replaced with a more powerful body.
It comes after Home Secretary Theresa May told inquiry members their panel might be disbanded.
The Met Police said earlier this month that detectives were investigating three alleged murders as part of their investigation into historical child abuse.
Mr Evans, who is chairman of the Welsh Tory party and a former deputy chairman of the Welsh NSPCC council, said: "Now I hear that a number of the groups who are representing victims have suggested the whole of the process should be stopped and a different sort of inquiry created.
"I don't know exactly what the terms of that inquiry should be and I'm not really sure what they mean by setting up a stronger inquiry because I think the inquiry that was being set up was a pretty strong one."
He said ongoing police inquiries introduced a "new dimension", and that they appeared to be proceeding on the basis of new evidence "in which the police have already made it clear to the media that there are real issues that are being investigated".
"It seems to me that those police inquiries have got to now take precedence. We ought not to have a situation in which we set up an inquiry and then we can only do half the job because police inquiries are ongoing."
Mr Evans, who was a Wales Office minister in the 1990s when the UK government set up the Waterhouse inquiry into abuse allegations at children's homes in north Wales, added: "It seems to me that the police inquiries are now at the forefront."
He said Mrs May should not be blamed for delays to the inquiry, which has been held up by the resignation of her first two choices of chairperson.
Victims must have confidence in the process, Mr Evans said, "and so the reason we are in the situation we are in is that we are struggling to find a chairman that the victims' groups will have confidence in".
An Old Master by painter Pieter Brueghel the Younger will remain on public display after a government fund paid £1m to save it for the nation.
[NEXT_CONCEPT]
Police investigations into claims of historical child abuse should "take precedence" over a UK government-ordered inquiry, a Welsh MP says.