Exhibit 10.2



RELEASE OF GUARANTIES

AND

SECOND AMENDMENT TO CREDIT AGREEMENT



THIS RELEASE OF GUARANTIES AND SECOND AMENDMENT TO CREDIT AGREEMENT
(this Second Amendment) is made and entered into as of the 28th day of June, 2004, by and between STANCORP FINANCIAL GROUP, INC., an Oregon corporation (the Borrower), and KEYBANK NATIONAL ASSOCIATION, a national banking
association (the Bank).



Recitals:



A. The Borrower and the Bank are parties to that certain
Credit Agreement dated as of June 30, 2003 (the Credit Agreement), pursuant to which, inter alia, the Bank agreed, subject to the terms and conditions thereof, to advance the Loan (as this and other capitalized terms used
herein but not otherwise defined herein are defined in the Credit Agreement) to the Borrower and issue Letters of Credit at the request of the Borrower.



B. On the date hereof, the aggregate unpaid principal balance of the Loan is $-0-; and the aggregate amount of the Letter of Credit Obligations is $-0-.



C. The Borrower has requested that the Bank agree to (i)
extend the Expiry Date, and (ii) release the Guarantors from, and cancel, the Guaranties.



D. Subject to the terms and conditions of this Second Amendment, the Bank has agreed to such requests.



Agreements:



NOW, THEREFORE, in consideration of the foregoing Recitals and the mutual agreements hereinafter set forth, the Borrower and the Bank hereby agree as
follows:



1. Release of Guaranties. Subject to the
terms and conditions of this Second Amendment, including, without limitation, Paragraph 3, below, the Bank hereby releases and cancels each of the Guaranties and agrees that each of SIC and SMI shall have no further liability thereunder.



---

2. Amendments to the Credit Agreement. Subject to the terms and conditions of this Second
Amendment, including, without limitation, Paragraph 3, below, the Credit Agreement is hereby modified as follows:



(A) The definition of Expiry Date in Section 1.1 of the Credit Agreement is amended and restated in its entirety to provide as follows:



Expiry Date means June 27, 2005.



(B) The definitions of Guarantors and
Guaranties are deleted in their entirety from Section 1.1 of the Credit Agreement.



(C) The following sentence is added, at the appropriate alphabetical position, to Section 1.1 of the Credit Agreement as a new definition of Material Subsidiaries:



Material Subsidiaries means SIC and SMI.



(D) Each and every reference in the Credit Agreement to
Guarantor or Guarantors shall be deemed to refer to, respectively, Material Subsidiary or Material Subsidiaries.



(E) Each and every reference in the Credit Agreement to Guaranty or Guaranties shall be deemed to be of no further force and
effect.



3. Effective Date; Conditions Precedent. The
release and cancellation of the Guaranties set forth in Paragraph 1, above, and the modifications to the Credit Agreement set forth in Paragraph 2, above, shall not be effective, unless and until the date on which the Borrower has satisfied all of
the following conditions precedent (such date of effectiveness being the Effective Date):



(A) On the Effective Date and after giving effect to the releases and modifications contained herein (i) there shall exist no Default or Event of Default,
and the President, a Senior Vice President or the Chief Financial Officer of the Borrower shall have delivered to the Bank written confirmation thereof dated as of the Effective Date and (ii) the representations and warranties of the Borrower under
the Credit Agreement shall have been reaffirmed in writing as of the Effective Date, subject only to variances therefrom acceptable to the Bank.



2



---

(B) The Borrower shall have delivered to the Bank a Certificate of its Secretary dated as of the
Effective Date certifying that attached thereto is a complete copy of resolutions adopted by the board of directors of the Borrower, authorizing the execution, delivery and performance of this Second Amendment and the agreements to be performed by
the Borrower hereunder.



(C) The Borrower shall have caused SIC
and SMI to enter into the Joinder on the signature page of this Second Amendment.



(D) The Borrower shall have paid to the Bank, in immediately available funds, an extension fee in the amount of Thirty-seven Thousand Five Hundred Dollars ($37,500).



(E) All legal matters incident to this Second Amendment and the consummation
of the transactions contemplated hereby shall be reasonably satisfactory to Squire, Sanders & Dempsey L.L.P., Cleveland, Ohio, special counsel to the Bank (the Special Counsel).



(F) The Bank shall have received such other certificates, opinions and
documents, in form and substance satisfactory to it, as it may reasonably request.



3



---

4. Other Loan Documents. Any reference to the Credit Agreement in the Note or the other Loan
Documents shall, from and after the Effective Date, be deemed to refer to the Credit Agreement, as modified by this Second Amendment.



5. Confirmation of Debt. The Borrower hereby affirms all of its Indebtedness, liabilities and obligations to the Bank under the Credit Agreement
and the other Loan Documents, as the same are modified hereby. The Borrower further acknowledges and agrees that as of the Effective Date, it has no claims, defenses or set-off rights against the Bank, and there are no claims, defenses or set-offs
to the enforcement by the Bank of the Indebtedness, liabilities and obligations of the Borrower under the Credit Agreement, the Note or the other Loan Documents.



6. No Other Modifications; Same Indebtedness. Except as expressly provided in this Second Amendment, all of the terms
and conditions of the Credit Agreement, the Note and the other Loan Documents remain unchanged and in full force and effect. The modifications effected by this Second Amendment and by any other instruments contemplated hereby shall not be deemed to
provide for or effect a repayment and re-advance of any portion of any Loan or Letter of Credit now outstanding, it being the intention of the Borrower and the Bank hereby that the Indebtedness owing under the Credit Agreement, as amended by this
Second Amendment, be and hereby is the same Indebtedness as that owing under the Credit Agreement immediately prior to the effectiveness hereof.



7. Reimbursement of Banks Expenses. The Borrower shall reimburse the Bank promptly for costs and expenses incurred by the Bank in connection
with this Second Amendment, including the fees and expenses of the Special Counsel.



4



---

8. Governing Law; Binding Effect. This Second Amendment shall be governed by and construed in
accordance with the laws of the State of Ohio and shall be binding upon and inure to the benefit of the Borrower, the Bank and their respective successors and assigns.



[No additional provisions are on this page; the page next following is the signature page.]



5



---

IN WITNESS WHEREOF the Bank and the Borrower have hereunto set their hands as of the date first above
written.



STANCORP FINANCIAL GROUP, INC.By

/s/    CINDY J. MCPIKECindy J. McPike, Vice President and Chief Financial OfficerKEYBANK NATIONAL ASSOCIATIONBy

/s/    MARY K. YOUNGMary K. Young, Vice President and Portfolio Manager




Joinder



The undersigned Standard Insurance Company and StanCorp
Mortgage Investors, LLC herby join in the foregoing Second Amendment as of the date first above written to acknowledge and accept the release and cancellation of their respective Guaranties.



|                           |  |                                                        |  |                                  |  |    |  |                                                       
|-------------------------- |  | ------------------------------------------------------ |  | -------------------------------- |  | -- |  | ------------------------------------------------------
|STANDARD INSURANCE COMPANY |  |                                                        |  | STANCORP MORTGAGE INVESTORS, LLC
|                           |  |                                                        |  |                                 
|By                         |  | /s/    ERIC E. PARSONS                                 |  |                                  |  | By |  | /s/    ERIC E. PARSONS                                
|                           |  | Eric E. Parsons, President and Chief Executive
Officer |  |                                  |  |    |  | Eric E. Parsons, President and Chief Executive
Officer



6