The general rule is, that, where there is a deficiency of testamentary assets, after the payment of debts, expenses and specific legacies, the loss is to be borne pro rata by those pecuniary legacies which are in their nature general. But if the chances of a deficiency are anticipated and provided for by the testator, his directions will govern, and the loss must be borne by those upon whom he places it. Towle v. Swasey, 106 Mass. 100. If testamentary gifts are founded upon some valuable consideration, such as a relinquishment of the widow’s *539right of dower or a gift in performance of a valid contract, the general rule does not apply, but such legatees take as purchasers, and are entitled to priority over the general legatees.
In the case at bar, if the testatrix had made no provisions looking to a deficiency of assets, it is difficult to see how the legacy to the appellant could claim priority over the other legacies. It was not given in pursuance of any valid contract, and was not founded upon any consideration. But the testatrix made provisions in the will for a possible deficiency, and the question is whether she intended that the legacy to the appellant should be subject to abatement pro rata with the general legacies.
The amount given to him was intended to be in repayment of a like sum lent to the' husband of the testatrix, and applied by him towards the payment for the house belonging to her. Though she was not under any legal liability to pay it, she seems to have recognized it as an equitable claim upon the proceeds of the house when sold. By the seventh article of her will she directs her executor to sell the house, “the proceeds thereof to be distributed as follows.” Then follows the clause under which Robertson claims.
The will then gives eleven legacies to different persons, mostly relatives, using in every case the words, “ I give and bequeath,” or “ I give,” — language not used, it is to be observed, in the pro vision for Robertson. Then follows this clause: “ All these specific bequests of money, in the event of there not being enough to pay them all in full, each one is to be paid in proportion to the sum left to him, and the event of any surplus to be shared in like manner.” The words “ all these specific bequests of money ” might include the provision for Robertson, but they more naturally apply to the eleven bequests immediately preceding, which the testatrix has described as gifts or bequests. The provision as to the distribution of the surplus, if any, furnishes strong evidence that she did .not intend to include the appellant within this clavise. He was to be paid a fixed sum, determined by the amount which he had advanced towards paying for the house. There is nothing in the will or in the relations existing between the testatrix and Robertson which would justify the inference that she intended that he should in any event be paid more than that sum.
*540Upon the whole case, we are of opinion that the scheme and purpose of the testatrix was to have the house sold, to pay to Robertson the amount advanced by him, and to divide the residue of the proceeds, more or less, among the various legatees named in proportion to the sums named as bequests to them severally; and that it was not her intention that the sum left to the appellant should be subject to abatement if there was a deficiency of assets.
Decree reversed.