BBC director-general Tony Hall said committing the corporation to fully fund TV licences for over-75s was the "right deal" in "difficult circumstances".
Culture Secretary John Whittingdale said the process will be phased in from 2018/19 with the BBC paying the full bill from 2020/21.
He told the House of Commons the broadcaster had agreed to "play its part in contributing to reductions in spending like much of the rest of the public sector" while further reducing its "reliance on taxpayers".
He also announced legislation will be brought forward in the next year to "modernise the licence fee" to cover public service broadcast catch-up TV - an apparent nod towards charging people who use the iPlayer.
The BBC licence fee of £145.50 is also expected to rise in line with the consumer price index measure of inflation.
Mr Hall said: "We have secured the right deal for the BBC in difficult economic circumstances for the country."
Labour labelled the "backroom deal" as "shabby".
In a letter addressed to Mr Whittingdale and Chancellor of the Exchequer George Osborne, BBC Trust chairman Rona Fairhead said it would not "obstruct" the decision but added it could not "endorse the process by which it has been reached".
Colin Browne, who chairs campaign group The Voice of the Listener and Viewer, said: "It is disgraceful that this decision has been taken with no public consultation of any kind."