Exhibit 10.39



JUNIOR SUBORDINATED PATENT AND LICENSE SECURITY AGREEMENT



JUNIOR SUBORDINATED PATENT AND LICENSE SECURITY AGREEMENT
(Agreement) dated as of October 25, 2004, made by PW EAGLE, INC., a Minnesota corporation, having its chief executive office at 1550 Valley River Drive, Eugene, Oregon 97440 (Borrower) and CHURCHILL CAPITAL PARTNERS IV, L.P.,
a Delaware limited partnership (Lender).



W I T N E
S S E T H:



WHEREAS, Borrower and Lender have entered into that
certain Junior Subordinated Note Purchase Agreement of even date herewith (as the same may hereafter be amended or otherwise modified from time to time, the Note Purchase Agreement), pursuant to which Lender has, subject to certain
conditions precedent, agreed to purchase the Junior Subordinated Notes of the Company (the Notes); and



WHEREAS, Lender has required as a condition, among others, to purchasing the Notes, in order to secure the prompt and complete payment, observance and
performance of all of Borrowers obligations and liabilities hereunder, under the Note Purchase Agreement, and under all of the other instruments, documents and agreements executed and delivered by Borrower to Lender in connection with the Note
Purchase Agreement (all such obligations and liabilities being hereinafter referred to collectively as the Obligations), that Borrower execute and deliver this Agreement to Lender for its benefit;



NOW, THEREFORE, in consideration of the premises set forth herein and for
other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, Borrower agrees as follows:



1. Defined Terms.



(a) Unless otherwise defined herein, the capitalized terms used herein which are defined in the Note Purchase Agreement shall have the
meanings specified in the Note Purchase Agreement.



(b) The words hereof, herein, and hereunder and words of like import when used in this Agreement shall refer to this Agreement as a whole and not to any particular provision of this Agreement, and section
and schedule references are to this Agreement unless otherwise specified.



(c) All terms defined in this Agreement in the singular shall have comparable meanings when used in the plural, and vice versa unless otherwise specified.



2. Security Interest in Patents. To secure the complete and timely
payment, performance and satisfaction of all of the Obligations, Borrower hereby grants to Lender, a third





---

priority security interest, having priority over all other security interests (except for Permitted Liens, including the Liens securing the Senior Debt and
the Liens securing the obligations under the Senior Subordinated Note Purchase Agreement), with power of sale to the extent permitted by applicable law, in all of Borrowers now owned or existing and filed and hereafter acquired or arising and
filed:



| | (i) | patents and patent applications, and the inventions and improvements described and claimed therein, including, without limitation, those patents and patent applications listed on
Schedule A and (a) the reissues, divisions, continuations, renewals, extensions and continuations-in-part thereof (b) all income, royalties, damages and payments now and hereafter due and/or payable under and with respect thereto, including,
without limitation, payments under all licenses entered into in connection therewith and damages and payments for past or future infringements thereof, (c) the right to sue for past, present and future infringements thereof, and (d) all rights
corresponding thereto throughout the world (all of the foregoing patents and applications, together with the items described in the foregoing clauses (a)-(d), being sometimes hereinafter individually and/or collectively referred to as the
Patents); and
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (ii) | license agreements with any other party in connection with any Patents or such other partys patents or patent applications, whether Borrower is a licensor or licensee under
any such license agreement, including, but not limited to, the license agreements listed on Schedule B, and the right upon the occurrence and during the continuance of an Event of Default to use the foregoing in connection with the
enforcement of Lenders rights under the Note Purchase Agreement (all of the foregoing being hereinafter referred to collectively as the Licenses). Notwithstanding the foregoing provisions of this Section 2, the Licenses
shall not include any license agreement which by its terms prohibits the grant of the security interest contemplated by this Agreement.
| | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



3. Restrictions on Future Agreements. Borrower will not, without Lenders prior written consent, enter into any agreement, including, without
limitation, any license agreement, which is inconsistent with this Agreement, and Borrower further agrees that it will not take any action, and will use its best efforts not to permit any action to be taken by others subject to its control,
including licensees, or fail to take any action, which would in any material respect affect the validity or enforcement of the rights transferred to Lender under this Agreement or the rights associated with those Patents which are material to the
operation of Borrowers business.



4. New Patents.
Borrower represents and warrants that the Patents and Licenses listed on Schedules A and B, respectively, include all of the patents, patent applications and license agreements in connection with patents or patent applications now owned or
held by Borrower. If prior to the termination of this Agreement, Borrower shall (i) obtain rights to any new patentable inventions or license agreements in connection with patents or patent applications or (ii) become entitled to the benefit of any
patent, patent application or patent for any reissue,



- 2 -



---

division, continuation, renewal, extension or continuation-in-part of any Patent or any improvement on any Patent, the provisions of Section 2 shall
automatically apply thereto and Borrower shall give to Lender prompt written notice thereof. Borrower hereby authorizes Lender to modify this Agreement by (a) amending Schedules A or B, as the case may be, to include any future patents,
patent applications and license agreements in connection with patents and patent applications that are Patents or Licenses under Section 2 or under this Section 4 and (b) filing, in addition to and not in substitution for, this
Agreement, a duplicate original of this Agreement containing on Schedules A or B thereto, as the case may be, such future patents, patent applications and license agreements which are Patents or Licenses, as the case may be, under Section
2 or this Section 4.



5. Royalties. Borrower
hereby agrees that the use by Lender of the Patents and Licenses as authorized hereunder shall be coextensive with Borrowers rights thereunder and with respect thereto and without any liability for royalties or other related charges from
Lender to Borrower.



6. Nature and Continuation of
Lenders Security Interest. This Agreement is made for collateral security purposes only. This Agreement shall create a continuing security interest in the Patents and the Licenses and shall remain in full force and effect until the
Obligations have been paid in full and the Note Purchase Agreement terminated.



7. Right to Inspect: Further Assignments and Security Interests. Lender shall have the right, at any reasonable time and from time to time, to inspect Borrowers premises and to examine Borrowers
books, records and operations relating to the Patents; provided, that in conducting such inspections and examinations, Lender shall use its best efforts not to disturb unnecessarily the conduct of Borrowers ordinary business operations,
and provided, further, that if no Event of Default has occurred and is continuing, Lender shall give Borrower at least 24 hours prior written notice of any such inspection. Borrower agrees not to sell or assign its respective interests in, or
grant any license under, the Patents without the prior written consent of Lender, which consent shall not be unreasonably withheld or delayed.



8. Duties of Borrower. Borrower shall have the duty to the extent desirable in the normal conduct of Borrowers business and consistent with
Borrowers current business practices: (i) to prosecute diligently any patent application that is part of the Patents pending as of the date hereof or thereafter until the termination of this Agreement, (ii) to make application on such
unpatented but patentable inventions as Borrower deems appropriate, and (iii) to take reasonable steps to preserve and maintain all of Borrowers rights in the patent applications and patents that are part of the Patents. Any expenses incurred
in connection with the foregoing shall be borne by Borrower. Borrower shall not abandon any right to file a patent application or any pending patent application or patent which is or, to Borrowers knowledge, shall be necessary or economically
desirable in the operation of Borrowers business. Borrower agrees to retain an experienced patent attorney reasonably acceptable to Lender (Fredrikson & Byron, P.A. being acceptable to Lender) for the filing and prosecution of all such
applications and other proceedings. Lender shall not have any duty with respect to the Patents and Licenses. Without limiting the generality of the foregoing, Lender shall not be under obligation to take any steps necessary to preserve rights in the
Patents or Licenses against any other parties, but may do so at



- 3 -



---

its option during the continuance of an Event of Default, and all expenses incurred in connection therewith shall be for the sole account of Borrower and
added to the Obligations secured hereby.



9. Lenders
Right to Sue. From and after the occurrence and during the continuance of an Event of Default, and subject to the terms of the Note Purchase Agreement, the Senior Subordination Agreement and the Junior Subordination Agreement, Lender shall have
the right, but shall not be obligated, to bring suit to enforce the Patents and the Licenses, and, if Lender shall commence any such suit, Borrower shall, at the request of Lender, do any and all lawful acts and execute any and all proper documents
required by Lender in aid of such enforcement Borrower shall, upon demand, promptly reimburse and indemnify Lender for all costs and reasonable expenses incurred by Lender in the exercise of its rights under this Section (including, without
limitation, all attorneys and paralegals fees). If for any reason whatsoever, Lender is not reimbursed with respect to the costs and expenses referred to in the preceding sentence, such costs and expenses shall be added to the
Obligations secured hereby.



10. Waivers. No course of
dealing between Borrower and Lender, and no failure to exercise or delay in exercising on the part of Lender any right, power or privilege hereunder or under the Note Purchase Agreement shall operate as a waiver of any of Lenders rights,
powers or privileges. No single or partial exercise of any right, power or privilege hereunder or under the Note Purchase Agreement shall preclude any other or further exercise thereof or the exercise of any other right, power or privilege.



11. Lenders Exercise of Rights and Remedies Upon
Default. Notwithstanding anything set forth herein to the contrary, it is hereby expressly agreed that upon the occurrence and during the continuance of an Event of Default, Lender may exercise any of the rights and remedies provided in this
Agreement, the Note Purchase Agreement, or any other agreement executed in connection therewith, subject to the Senior Subordination Agreement and the Junior Subordination Agreement. Without limiting the generality of the foregoing, Borrower
acknowledges and agrees that (i) the Patents and Licenses comprise a portion of the Collateral and Lender shall have the right to exercise its rights under the Note Purchase Agreement with respect to the Patents and Licenses to the same extent as
with respect to all other items of Collateral described therein, and (ii) from and after the occurrence of an Event of Default, Lender or its nominee may use the Patents and Licenses in connection with the conduct of Borrowers business.



12. Severability. The provisions of this Agreement are
severable, and if any clause or provision shall be held invalid and unenforceable in whole or in part in any jurisdiction, then such invalidity or unenforceability shall affect only such clause or provision, or part thereof, in such jurisdiction,
and shall not in any manner affect such clause or provision in any other jurisdiction, or any other clause or provision of this Agreement in any jurisdiction.



13. Modification. This Agreement cannot be altered, amended or modified in any way, except as specifically provided in Sections 2 and 4
hereof or by a writing signed by the parties hereto.



14.
Cumulative Remedies; Power of Attorney. All of Lenders rights and remedies with respect to the Patents and the Licenses, whether established hereby, by any other



- 4 -



---

agreement or by law, shall be cumulative and may be exercised singularly or concurrently. Borrower hereby irrevocably appoints Lender as Borrowers
attorney-in-fact, with full authority in the place and stead of Borrower and in the name of Borrower or otherwise to carry out the acts described below. Subject to the terms of the Note Purchase Agreement, the Senior Subordination Agreement and the
Junior Subordination Agreement, upon the occurrence and during the continuance of an Event of Default, Borrower hereby authorizes Lender to, in its sole discretion, (i) endorse Borrowers name on all applications, documents, papers and
instruments necessary or desirable for Lender in the use of the Patents and the Licenses, (ii) take any other actions with respect to the Patents and the Licenses as Lender deems is in its best interest, (iii) grant or issue any exclusive or
non-exclusive license with respect to the Patents to anyone on commercially reasonable terms, and (iv) assign, pledge, convey or otherwise transfer title in or dispose of the Patents and the Licenses to anyone on commercially reasonable terms.
Borrower hereby ratifies all that such attorney-in-fact shall lawfully do or cause to be done by virtue hereof. This power of attorney is coupled with an interest and shall be irrevocable until this Agreement shall have been terminated pursuant to
Section 6. Borrower acknowledges and agrees that this Agreement is not intended to limit or restrict in any way the rights and remedies of Lender under the Note Purchase Agreement, but rather is intended to facilitate the exercise of such
rights and remedies. Lender shall have, in addition to all other rights and remedies given it by the terms of this Agreement, all rights and remedies allowed by law and the rights and remedies of a secured party under the Uniform Commercial Code as,
enacted in any jurisdiction in which the Patents may be located or deemed located.



15. Binding Effect; Benefits. This Agreement shall be binding upon Borrower and its successors and assigns and shall inure to the benefit of Lender and its nominees, successors and assigns. Borrowers
successors and assigns shall include, without limitation, a receiver, trustee or debtor-in-possession of or for Borrower; provided, however, that Borrower shall not voluntarily assign its obligations hereunder without the prior written
consent of Lender.



16. Governing Law. This Agreement
shall be governed by and construed in accordance with the internal laws (as distinguished from the conflicts of law provisions) and decisions of the State of Minnesota.



17. Notices. All notices or other communications hereunder shall be given in the manner and to the addresses set
forth in the Note Purchase Agreement.



18. Section
Headings. The section headings herein are for convenience of reference only, and shall not affect in any way the interpretation of any of the provisions hereof.



19. Execution in Counterparts. This Agreement may be executed in any number of counterparts and by different parties
hereto in separate counterparts, each of which when so executed shall be deemed to be an original and all of which taken together shall constitute one and the same agreement.



[Signature Page Follows]



- 5 -



---

IN WITNESS WHEREOF, the parties hereto have duly executed this Junior Subordinated Patent and License
Security Agreement on the day and year first above written.



PW EAGLE, INC., a Minnesota corporationBy:Name:Title:Accepted and agreed to as of this  day of October, 2004.CHURCHILL CAPITAL PARTNERS IV, L.P.By:

Churchill Capital IV, L.L.C, its General PartnerBy:

Churchill Capital, Inc., as Managing AgentBy:Name:Title:




- 6 -



---

|                   |  |     
|------------------ |  | ----
|STATE OF MINNESOTA |  | )   
|                   |  | ) SS
|COUNTY OF HENNEPIN |  | )   



The foregoing Junior
Subordinated Patent and License Security Agreement was executed and acknowledged before me this day of October, 2004, by
 personally known to me to be the
 of PW EAGLE, INC., a Minnesota corporation, on
behalf of such corporation.



(SEAL)



Notary PublicMy commission expires:




- 7 -



---



SCHEDULE A

to Patent and License Security Agreement



PATENTS



[Schedule to be attached.]



- 8 -



---



SCHEDULE B

to Patent and License Security Agreement



LICENSES



[Schedule to be attached.]



- 9 -