EX-5.1 2 file2.htm LEGALITY OPINION


                                                    Mayer, Brown, Rowe & Maw LLP
                                                                 71 South Wacker
                                                    Chicago, Illinois 60606-4637

April 5, 2007

                                                         Main Tel (312) 782-0600
                                                         Main Fax (312) 701-7711
                                                          www.mayerbrownrowe.com

Residential Asset Mortgage Products, Inc.
8400 Normandale Lake Boulevard, Suite 250
Minneapolis, MN  55437

      Re: Mortgage Asset-Backed Pass-Through Certificates, Series 2007-SP1

Ladies and Gentlemen:

     At your request, we have examined the Registration Statement on Form S-3
(File No. 333-131211), filed by Residential Asset Mortgage Products, Inc., a
Delaware corporation (the "Registrant"), with the Securities and Exchange
Commission (the "Commission") on January 20, 2007 and declared effective on
March 31, 2007 (the "Registration Statement"), in connection with the
registration under the Securities Act of 1933, as amended (the "Act"), of
Mortgage Asset-Backed Pass-Through Certificates, Series 2007-SP1 (the
"Certificates"). The Certificates will be issued pursuant to a Pooling and
Servicing Agreement, dated as of March 1, 2007, (the "Pooling and Servicing
Agreement") as more particularly described in the prospectus, dated December 4,
2006 and the prospectus supplement, dated April 5, 2007, relating to the
Certificates (together, the "Prospectus").

     We have assumed for the purposes of the opinions set forth below that the
Certificates will be sold by you for reasonably equivalent consideration. We
have also assumed the following: (a) the authenticity of original documents and
the genuineness of all signatures; (b) the conformity to the originals of all
documents submitted to us as copies; and (c) the truth, accuracy and
completeness of the information, representations and warranties contained in the
records, documents, instruments and certificates we have reviewed. In addition,
we have assumed that the parties to the Pooling and Servicing Agreement will
satisfy their respective obligations thereunder.



 Berlin Brussels Charlotte Chicago Cologne Frankfurt Houston London Los Angeles
                   New York Palo Alto Paris Washington, D.C.
     Independent Mexico City Correspondent: Jauregui, Navarrete y Nader S.C.

         Mayer, Brown, Rowe & Maw LLP operates in combination with our
  associated English limited liability partnership in the offices listed above.



Residential Asset Mortgage Products, Inc.
April 5, 2007
Page 2

     On the basis of the foregoing examination and assumptions, and upon
consideration of applicable law, it is our opinion that when the Pooling and
Servicing Agreement has been duly and validly executed and delivered by the
parties thereto, and the Certificates have been duly executed and delivered in
accordance with the Pooling and Servicing Agreement and sold, the Certificates
will be legally issued, fully paid and nonassessable, and the holders of the
Certificates will be entitled to the benefits of the Pooling and Servicing
Agreement, except as enforcement thereof may be limited by applicable
bankruptcy, insolvency, reorganization, arrangement, fraudulent conveyance,
moratorium, or other laws relating to or affecting the rights of creditors
generally and general principles of equity, including without limitation,
concepts of materiality, reasonableness, good faith and fair dealing, and the
possible unavailability of specific performance or injunctive relief, regardless
of whether such enforceability is considered in a proceeding in equity or at
law.

                            [SIGNATURE PAGE FOLLOWS]



Residential Asset Mortgage Products, Inc.

     We hereby consent to the filing of this letter as an exhibit to the
Registration Statement and to the references to this firm under the headings
"Legal Matters" in the Prospectus and in the Prospectus Supplement forming a
part of the Registration Statement, without admitting that we are "experts"
within the meaning of the term used in the Act or the rules and regulations of
the Commission issued thereunder, with respect to any part of the Registration
Statement, including this exhibit or otherwise.

                                        Very truly yours,

                                        /s/ Mayer, Brown, Rowe & Maw LLP
                                        MAYER, BROWN, ROWE & MAW LLP