**Exhibit 10.5(f)**

AMENDMENT NO. 5

TO

MASTER REPURCHASEAGREEMENT

THIS AMENDMENT NO. 5, made as of May 10, 2006 (“AmendmentNo. 5”), by and among BEAR STEARNS MORTGAGE CAPITAL CORPORATION (the “Buyer”)and AAMES CAPITAL CORPORATION (“ACC”), AAMES INVESTMENT CORPORATION (“AIC”) andAAMES FUNDING CORPORATION (“AFC”, and together with ACC and AIC, the “Sellers”).

R E C I T A L S

WHEREAS, Buyer and the Sellers have previously enteredinto a Master Repurchase Agreement dated as of August 5, 2004, as amended byAmendment No. 1 dated as of March 18, 2005, Amendment No. 2 dated as of June20, 2005, Amendment No. 3 dated as of October 31, 2005 and Amendment No. 4dated as of March 1, 2006 (collectively, the “Agreement”); and

WHEREAS, Buyer and the Sellers desire to modify theterms of the Agreement;

NOW, THEREFORE, in consideration of the mutualpromises and covenants hereinafter set forth, and for other good and valuableconsideration, the receipt and sufficiency of which is hereby acknowledged, theparties hereto agree as follows:

# Section 1.  Definitions.  Capitalized terms used herein and nototherwise defined shall have the meanings assigned in the Agreement.

# Section 2.  Financial Covenants.  Effective as March 30, 2006, Section10(d)(xviii) of the Agreement is hereby deleted in its entirety and replaced bythe following:

##  (xviii)     forany two consecutive fiscal quarters of AIC, commencing with respect to the twoconsecutive fiscal quarters ending on September 30, 2006, AIC shall not show aloss after aggregating the profits and losses of AIC for the subject fiscalquarters (all determined in accordance with GAAP).

# Section 3.  Joint and Several Liability of Sellers.  AIC hereby acknowledges that it is jointlyand severally liable for the obligations of each Seller under the Agreement asset forth in Paragraph 19 of the Agreement.

# Section 4.  Expenses.  Each party hereto shall pay its own expensesin connection with this Amendment No. 5.

# Section 5.  Controlling Law.  This Amendment No. 5 shall be governed andconstrued in accordance with the laws of the State of New York applicable toagreements made and entirely performed therein.

----

 

# Section 6.  Interpretation.  The provisions of the Agreement shall be readso as to give effect to the provisions of this Amendment No. 5.

# Section 7.  Counterparts.  This Amendment No. 5 may be executed in anynumber of counterparts, each of which counterparts shall be deemed to be anoriginal, and such counterparts shall constitute but one and the sameinstrument.

# Section 8.  Ratification and Confirmation.  As amended by this Amendment No. 5, theAgreement is hereby in all respects ratified and confirmed, and the Agreementas amended by this Amendment No. 5 shall be read, taken and construed as oneand the same instrument.

[Remainder of PageBlank – Signatures Follow]

2

----

 

IN WITNESS WHEREOF, Buyer and each of the Sellers havecaused their names to be signed hereto by their respective officers thereuntoduly authorized, all as of the date first above written.
|   | BEAR STEARNS MORTGAGE  CAPITAL  CORPORATION |
|--------|---------------------------------------------|
|   |                                        |
|   | By:                                         |   |   |
|   | Title:                                      |   |   |
|   | Date:                                       |   |   |
|   |                                        |
|   | AAMES CAPITAL  CORPORATION                  |
|   |                                        |
|   | By:                                         |   |   |
|   | Title:                                      |   |   |
|   | Date:                                       |   |   |
|   |                                        |
|   | AAMES INVESTMENT  CORPORATION               |
|   |                                        |
|   | By:                                         |   |   |
|   | Title:                                      |   |   |
|   | Date:                                       |   |   |
|   |                                        |
|   | AAMES FUNDING  CORPORATION                  |
|   |                                        |
|   | By:                                         |   |   |
|   | Title:                                      |   |   |
|   | Date:                                       |   |   |
|        |                                             |  |  |  |

 

3

----