EXHIBIT 10.1

                                 AMENDMENT NO. 5
               TO AMENDED AND RESTATED MASTER REPURCHASE AGREEMENT


                  AMENDMENT NO. 5 TO AMENDED AND RESTATED MASTER REPURCHASE
AGREEMENT, dated as of December 10, 2004, (the Amendment") by and between
Merrill Lynch Mortgage Capital Inc. (the "Buyer"), and MortgageIT, Inc. ("MIT"
and a "Seller") and MortgageIT Holdings, Inc. ("Holdings" and a "Seller" and
together with MIT the "Sellers"):

                  The Buyer and the Sellers are parties to that certain Amended
and Restated Master Repurchase Agreement, dated as of August 4, 2004, as amended
by Amendment No. 1, dated as of September 21, 2004, Amendment No. 2, dated as of
November 11, 2004, Amendment No. 3, dated as of November 18, 2004 and Amendment
No. 4, dated as of December 8, 2004 (the "Existing Repurchase Agreement"; as
amended by this Amendment, the "Repurchase Agreement"). Capitalized terms used
but not otherwise defined herein shall have the meanings given to them in the
Existing Repurchase Agreement.

                  The Buyer and the Seller have agreed, subject to the terms and
conditions of this Amendment, that the Existing Repurchase Agreement be amended
to reflect certain agreed upon revisions to the terms of the Existing Repurchase
Agreement.

                  Accordingly, the Buyer and the Seller hereby agree, in
consideration of the mutual premises and mutual obligations set forth herein,
that the Existing Repurchase Agreement is hereby amended as follows:

                  Section 1. Definitions. Section 2 of the Existing Repurchase
Agreement is hereby amended by:

                  1.1 deleting the definition of "Maximum Purchase Price" in its
entirety and replacing it with the following language:

                  "Maximum Purchase Price" shall mean $500,000,000.

                  1.2 deleting the definition of "Market Value" in its entirety
and replacing it with the following language:

                  "Market Value" shall mean, as of any date with respect to any
Purchased Mortgage Loan, the price at which such Mortgage Loan could readily be
sold as determined by the Buyer in its sole good-faith discretion. Without
limiting the generality of the foregoing, the Sellers acknowledge that the
Market Value of a Purchased Mortgage Loan may be reduced to zero by Buyer if:

                  (a) such Purchased Mortgage Loan ceases to be an Eligible
         Mortgage Loan;


                  (b) the Purchased Mortgage Loan has been released from the
         possession of the Custodian under the Custodial Agreement (other than
         to a Take-out Investor pursuant to a Bailee Letter) for a period in
         excess of 10 Business Days;

                  (c) the Purchased Mortgage Loan is a Wet-Ink Mortgage Loan for
         which the related Mortgage File has not been received and certified by
         the Custodian by the seventh Business Day following the related
         Purchase Date;

                  (d) such Purchased Mortgage Loan is a Delinquent Mortgage
         Loan;

                  (e) such Purchased Mortgage Loan is rejected by the related
         Takeout Investor;

                  (f) such Purchased Mortgage Loan has been subject to a
         Transaction hereunder for period of greater than 120 days, unless such
         Purchased Mortgage Loan is an Aged Mortgage Loan;

                  (g) a First Payment Default occurs with respect to such
         Purchased Mortgage Loan;

                  (h) the Buyer has determined in its sole good-faith discretion
         that the Purchased Mortgage Loan is not eligible for whole loan sale or
         securitization in a transaction consistent with the prevailing sale and
         securitization industry with respect to substantially similar Mortgage
         Loans;

                  (i) such Purchased Mortgage Loan contains a material breach of
         a representation or warranty made by a Seller in this Repurchase
         Agreement or the Custodial Agreement;

                  (j) when the Purchase Price for such Purchased Mortgage Loan
         is added to the aggregate Purchase Price of other Purchased Mortgage
         Loans, the aggregate Purchase Price of all Aged Mortgage Loans exceeds
         5% of the Maximum Purchase Price;

                  (k) when the Purchase Price for such Purchased Mortgage Loan
         is added to the aggregate Purchase Price of other Purchased Mortgage
         Loans, the aggregate Purchase Price of all HELOCs exceeds $100,000,000;

                  (l) when the Purchase Price for such Purchased Mortgage Loan
         is added to the aggregate Purchase Price of other Purchased Mortgage
         Loans, the aggregate Purchase Price of all HELOCs that have a FICO
         score of 680 or less exceeds $35,000,000;

                  (m) when the Purchase Price for such Purchased Mortgage Loan
         is added to the aggregate Purchase Price of other Purchased Mortgage
         Loans, the aggregate Purchase Price of all Closed End Second Lien
         Mortgage Loans exceeds 5% of the Maximum Purchase Price;

                  (n) when the Purchase Price for such Purchased Mortgage Loan
         is added to the aggregate Purchase Price of other Purchased Mortgage
         Loans, the aggregate Purchase Price of all Super Jumbo Mortgage Loans
         exceeds 7.5% of the Maximum Purchase Price;

                                      -2-


                  (o) when the Purchase Price for such Purchased Mortgage Loan
         is added to the aggregate Purchase Price of other Purchased Mortgage
         Loans, the aggregate Purchase Price of all EC Mortgage Loans exceeds 5%
         of the aggregate Purchase Price of all Purchased Mortgage Loans;

                  (p) when the Purchase Price for such Purchased Mortgage Loan
         is added to the aggregate Purchase Price of other Purchased Mortgage
         Loans, the aggregate Purchase Price of all Wet-Ink Mortgage Loans
         exceeds (i) with respect to the first five (5) Business Days of a month
         and the last five (5) Business Days of a month, 25% of the Maximum
         Purchase Price or (ii) with respect to all other times, 15% of the
         Maximum Purchase Price;

                  (q) when the Purchase Price for such Purchased Mortgage Loan
         is added to the aggregate Purchase Price of other Purchased Mortgage
         Loans, the aggregate Purchase Price of all Sub-prime Mortgage Loans
         exceeds 20% of the Maximum Purchase Price;

                  (r) when the Purchase Price for such Purchased Mortgage Loan
         is added to the aggregate Purchase Price of other Purchased Mortgage
         Loans, the aggregate Purchase Price of all Wet-Ink Mortgage Loans that
         are Sub-prime Mortgage Loans exceeds 4% of the Maximum Purchase Price;
         and

                  (s) when the Purchase Price for such Purchased Mortgage Loan
         is added to the aggregate Purchase Price of other Purchased Mortgage
         Loans, the aggregate Purchase Price of all Co-op Loans exceeds 5% of
         the aggregate Purchase Price of all Purchased Mortgage Loans.

                  Section 2. Temporary Amendment. For purposes of this
Amendment, this Section 2 will be effective only during the period beginning on
the date hereof through and including December 31, 2004 (the "Increased Maximum
Purchase Price Period").

                  (a) Definitions. Section 2 of the Existing Repurchase
         Agreement is hereby temporarily amended, which amendment shall be
         effective solely during the Increased Maximum Purchase Price Period, by
         deleting the definition of "Maximum Purchase Price" in its entirety and
         replacing it with the following language:

                  "Maximum Purchase Price" shall mean $750,000,000.

                  Section 3. Conditions Precedent. This Amendment shall become
effective on the date hereof (the "Amendment Effective Date") subject to the
satisfaction of the following conditions precedent:

                  3.1 Delivered Documents. On the Amendment Effective Date, the
Buyer shall have received the following documents, each of which shall be
satisfactory to the Buyer in form and substance:

                  (a) this Amendment, executed and delivered by a duly
         authorized officer of each of the Buyer and the Seller; and

                                      -3-


                  (b) such other documents as the Buyer or counsel to the Buyer
         may reasonably request.

                  Section 4. Fees. The Seller agrees to pay as and when billed
by the Buyer all of the reasonable fees, disbursements and expenses of counsel
to the Buyer in connection with the development, preparation and execution of,
this Amendment or any other documents prepared in connection herewith and
receipt of payment thereof shall be a condition precedent to the Buyer entering
into any Transaction pursuant hereto.

                  Section 5. Confidentiality. The parties hereto acknowledge
that this Amendment, the Existing Repurchase Agreement, and all drafts thereof,
documents relating thereto and transactions contemplated thereby are
confidential in nature and the Seller agrees that, unless otherwise directed by
a court of competent jurisdiction, it shall limit the distribution of such
documents and the discussion of such transactions to such of its officers,
employees, attorneys, accountants and agents as is required in order to fulfill
its obligations under such documents and with respect to such transactions.

                  Section 6. Limited Effect. Except as expressly amended and
modified by this Amendment, the Existing Repurchase Agreement shall continue to
be, and shall remain, in full force and effect in accordance with its terms.

                  Section 7. Counterparts. This Amendment may be executed in one
or more counterparts and by different parties hereto on separate counterparts,
each of which, when so executed, shall constitute one and the same agreement.

                  SECTION 8. GOVERNING LAW. THIS AMENDMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH THE LAWS OF THE STATE OF NEW YORK, AND THE OBLIGATIONS, RIGHTS
AND REMEDIES OF THE PARTIES HEREUNDER SHALL BE DETERMINED IN ACCORDANCE WITH
SUCH LAWS.

                  Section 9. Conflicts. The parties hereto agree that in the
event there is any conflict between the terms of this Amendment, and the terms
of the Existing Repurchase Agreement, the provisions of this Amendment shall
control.

                            [SIGNATURE PAGE FOLLOWS]








                                      -4-


                  IN WITNESS WHEREOF, the parties have caused their names to be
signed hereto by their respective officers thereunto duly authorized as of the
day and year first above written.


Buyer:                                MERRILL LYNCH MORTGAGE CAPITAL INC.



                                      By: /s/ JOHN WINCHESTER
                                          -------------------
                                          Name:  John Winchester
                                          Title: Vice President


Seller:                               MORTGAGEIT, INC.



                                      By: /s/ JOHN R. CUTI
                                         -----------------
                                          Name:  John R. Cuti
                                          Title: General Counsel and Secretary


Seller:                               MORTGAGEIT HOLDINGS, INC.



                                      By: /s/ JOHN R. CUTI
                                         -----------------
                                          Name:  John R. Cuti
                                          Title: General Counsel and Secretary