What happens to an MBS if all the underlying mortgages are fully paid back by the borrowers much before the maturity date? What would happen to an MBS (mortgage-backed security) if hypothetically speaking all the underlying mortgages were fully paid back by the mortgagees (borrowers), much before the maturity date?
I request the repliers of this question to follow this pattern:

If the answer is w.r.t. a global context, please start it with &quot;In a
global context...&quot; .
If the answer is w.r.t. only a country(XYZ)'s
context, please start it with &quot;In XYZ , ....&quot;.

Thank you in advance!!!
Depends on the structure.

In the US, most residential MBS are pass-through, so the MBS is prepaid.
In Canada, MBS are (or at least were) mostly packaged into non-passthrough structures, so MBS cash flows follow fixed coupon schedule. There are prepayment penalties which are used to absorb the cash flows.
My understanding is that European pfandebriefe markets use a collateral pool, which absorbs prepayments.