A deal has been struck to ensure that married couples in Scotland will continue to receive an allowance when the new Scottish income tax rates kick in from April.
At present, the allowance only covers the basic 20p rate.
But the law will be changed to extend that to the new Scottish 19p and 21p rates.
The move follows discussions between the Scottish government and Her Majesty's Revenue and Customs.
The allowance allows one partner to transfer up to £1,150 of their tax-free married allowance to their spouse, who must be a basic rate taxpayer.
It currently means married couples, and those in civil partnerships, can reduce their tax bill by up to £230 a year - which will increase to £260 from April this year.
But there had been concern that changes to Scottish income tax rates announced by Finance Secretary Derek Mackay as part of his draft budget would cause many couples in Scotland to miss out on the allowance in future.
This is because they would no longer be classed as basic rate taxpayers.
Mr Mackay's proposals, which must be approved by Holyrood, will see the basic rate frozen at 20p, as well as the introduction of a new intermediate rate of 21p, which will kick in after £24,000.
The higher rate and additional rates are also being upped by 1p to 41p and 46p respectively.
But the changes offset that with the introduction of a "Scottish starter rate" tax of 19p, which will apply to the first £2,000 of taxable income between £11,850 and £13,850.
Mr Mackay was pressed over the marriage allowance when he appeared before Holyrood's finance committee earlier this week, and said Westminster needed to make a "minor technical change" to resolve the issue.
BBC Scotland political editor Brian Taylor said on Friday that an agreement had now been reached between the two governments.