<PAGE>

EXHIBIT 10.5

                               CONTINUING GUARANTY
                                    AGREEMENT


         THIS CONTINUING GUARANTY ("Guaranty") dated as of November 3rd, 2005 is
made by Neil Koehler, an individual ("Guarantor"), in favor of W.M. Lyles Co., a
California corporation ("Design-Builder").

                                    RECITALS

         A. Design-Builder desires to enter into Design-Build Agreements with
Pacific Ethanol Madera LLC, a Delaware limited liability company ("PEM"), to
construct an ethanol plant in Madera, California (the "Plant").

         B. Subject to the terms of that certain letter agreement between
Pacific Ethanol California, Inc., a California corporation ("Sponsor") and
Design-Builder, dated the date hereof (as in effect on the date hereof, "Letter
Agreement"), attached to this Guaranty for reference, Sponsor agreed to
reimburse Design-Builder in the event Design-Builder pays delay and/or
performance liquidated damages to PEM for purposes of an Engineer Performance
Failure or an Engineer Delay Failure. The terms "Engineer Performance Failure"
and "Engineer Delay Failure" are defined in the Letter Agreement.

         C. Design-Builder requires that Guarantor execute and deliver this
Guaranty as a condition of executing the Design-Build Agreements.

         NOW, THEREFORE, in order to induce Design-Builder to enter into the
Design-Build Agreements, and in consideration thereof, Guarantor agrees as
follows:

1. CONTINUATION OF UNDERLYING AGREEMENTS. The Guarantor's obligations under this
Guaranty remain in full force and effect and are incorporated by reference as
though set forth in their entirety herein. It is further understood and agreed
that this Guaranty is not in substitution or waiver of Design-Builder's rights
and remedies arising under and in connection with the Design-Build Agreements
and this Guaranty.

2. OBLIGATION GUARANTEED. For valuable consideration, the undersigned Guarantor
unconditionally guarantees to Design-Builder the prompt payment in full of all
of the Sponsor's payment obligations under the Letter Agreement (the "Guaranteed
Obligations"). In the event that Sponsor fails to satisfy its payment
obligations under the Letter Agreement, then Design-Builder shall promptly
notify Guarantor of such failure and, subject to Section 3 below, Guarantor
shall pay to Design-Builder an amount equal to the amount Sponsor so failed to
pay within 10 business days of the date of such notice. Notwithstanding the
foregoing, (a) if Guarantor makes any payment to Design-Builder hereunder and
Design-Builder subsequently recovers amounts from the Engineer arising out of
claims made for Engineer Performance Failure, Engineer Delay Failure, or
otherwise, to the extent that such amounts are not turned over to Sponsor per
the Letter Agreement, Design-Builder shall promptly reimburse Guarantor for such

                                       1




<PAGE>

collected amounts, (b) Design-Builder shall proceed against Sponsor and seek
payment under the Letter Agreement before seeking payment from Guarantor
hereunder, and (c) Design-Builder shall call on this Guaranty and the guaranty
provided on the date hereof by William L. Jones on a PRO RATA basis (provided,
that if such other guarantor fails to make such payment, then the Guarantor
shall be responsible for the shortfall up to the limits set forth in Section 3
below).

3. EXTENT OF LIABILITY. The liability of Guarantor hereunder shall not exceed
the sum of Four Million Dollars ($4,000,000), plus any attorneys' fees, costs
and expenses as provided in Paragraph 9 of this Guaranty. The liability of
Guarantor under this agreement is exclusive and independent of any security for
or other guarantee of the indebtedness of Sponsor, whether executed by Guarantor
or any other party, and the liability of Guarantor under this Guaranty is not
affected or impaired by any of the following:

         (a)      Any Guaranteed Obligation exceeding Guarantor' liability;
         (b)      Any direction of application by Sponsor or any other party;
         (c)      Any other continuing or other guaranty, undertaking of
                  Guarantor or of any other party as to the Guaranteed
                  Obligation;
         (d)      Any payment on or in reduction of any other guaranty or
                  undertaking;
         (e)      Any notice of termination of this Guaranty as to future
                  transactions given by, or the death or termination of, or the
                  revocation or release of any obligations under this Guaranty
                  of, any other of the Guarantor;
         (f)      Any dissolution, termination or increase, decrease or changes
                  of personnel of any of the Guarantor; or
         (g)      Any payment made to the Sponsor on the Guaranteed Obligation
                  that Design-Builder repays to Sponsor pursuant to court order
                  in any bankruptcy, reorganization, arrangement, moratorium or
                  other debtor relief proceeding. Guarantor waives any right to
                  the deferral or modification of Guarantor's obligations by
                  virtue of any such proceeding.

4. JOINDER OF PARTIES. The obligation of Guarantor is independent of the
obligations of Sponsor. Design-Builder, who may bring and prosecute a separate
action or actions against Guarantor, whether it brings an action against
Sponsor, or joins Sponsor in any action or actions commenced. Guarantor waives,
to the fullest extent permitted by law, the benefit of any statute of
limitations affecting the Guarantor's liability under this Guaranty or the
enforcement of this Guaranty. Any payment by Sponsor or other circumstance that
operates to toll any statute of limitations as to Sponsor also operates to toll
the statute of limitations as to Guarantor.

5. CHANGE OF OBLIGATION. Guarantor authorizes Design-Builder, (whether or not
after revocation or termination of this Guaranty) without notice or demand
(except any notice or demand that is required by statute and cannot be waived)
and without affecting or impairing their liability, from time to time to do any
of the following:

         (a)      Renew, compromise, extend, accelerate or otherwise change the
                  time for performance of, or otherwise change the terms of the
                  Guaranteed Obligation including increase or decrease the rate
                  of interest;

                                       2




<PAGE>

         (b)      Take and hold security for the performance of this Guaranty or
                  the Guaranteed Obligation, and exchange, enforce, waive and
                  release any security;
         (c)      Apply security and direct the order or manner of sale of
                  security as Design-Builder in its discretion may determine;
                  and
         (d)      Release or substitute any one or more of the Guarantor.

Design-Builder may not assign this Guaranty in whole or in part. Design-Builder
may not increase the scope of the Guaranteed Obligations without the prior
written consent of the Guarantor.

6. CAPACITY AND AUTHORITY. If Sponsor is a corporation, partnership or other
entity, Design-Builder need not inquire into or verify the powers of Sponsor or
the authority of those acting or purporting to act on behalf of Sponsor, and
this Guaranty is enforceable with respect to any Guaranteed Obligation in
reliance on the purported exercise of those powers or authority.

7. WAIVER OF DEFENSES.

         (a)      Guarantor waives any defense based on or arising out of any
                  defense of Sponsor other than payment in full of the
                  Guaranteed Obligation, including without limitation any
                  defense based on or arising out of the disability of Sponsor,
                  the unenforceability of the Guaranteed Obligation from any
                  cause, or the cessation from any cause of the liability of
                  Sponsor other than payment of the Guaranteed Obligation.

         (b)      Guarantor assumes all responsibility for keeping Guarantor
                  informed of Sponsor's financial condition and assets, and of
                  all other circumstances bearing on the risk of nonpayment of
                  the indebtedness and the nature, scope, and extent of the
                  risks that Guarantor assumes and incurs under this Guaranty,
                  and agrees that Design-Builder shall have no duty to advise
                  Guarantor of information known to it regarding those
                  circumstances or risks.

8. SUBORDINATION. From and after the date Sponsor owes Design-Builder any monies
under the Letter Agreement and until such time as such monies are paid to
Design-Builder, any indebtedness of Sponsor now or later held by Guarantor is
subordinated to the indebtedness of Sponsor to Design-Builder, and all
indebtedness of Sponsor to Guarantor, if Design-Builder so requests, shall be
collected, enforced, and received by Guarantor as trustees for Design-Builder
and be paid over to Design-Builder on account of the indebtedness of Sponsor to
Design-Builder, without affecting or impairing in any manner the liability of
Guarantor under the other provisions of this Guaranty. Any instruments now or
later evidencing any indebtedness of Sponsor to the undersigned shall be marked
with a legend that they are subject to this Guaranty, and, if Design-Builder so
requests, shall be delivered to Design-Builder.

                                       3




<PAGE>


9. ATTORNEYS' FEES AND COSTS. In addition to the amounts guaranteed under this
Guaranty, Guarantor agrees to pay reasonable attorneys' fees and all other
out-of-pocket costs and expenses incurred by Design-Builder in enforcing this
Guaranty in any action or proceeding arising out of, or relating to, this
Guaranty.

10. NONWAIVER OF RIGHTS OF DESIGN-BUILDER. No right or power of Design-Builder
under this Guaranty shall be deemed to have been waived by any act or conduct on
the part of Design-Builder, or by any neglect to exercise that right or power,
or by any delay in so doing; and every right or power shall continue in full
force and effect until specifically waived or released by an instrument in
writing executed by Design-Builder.

11. EFFECT ON HEIRS AND ASSIGNS. This Guaranty and the liability and obligations
of Guarantor under this Guaranty are binding on Guarantor and the Guarantor's
respective heirs, executors and assigns, and inure to the benefit of and are
enforceable by Sponsor and its successors, transferees and assigns.

12. NOTICES. Any notice given by any party under this Guaranty shall be
personally delivered or sent by United States mail, postage prepaid, and
addressed to Design-Builder or Guarantor at their respective addresses for
notices indicated below. Guarantor and Design-Builder may change the place to
which notices, requests and other communications are to be sent to them by
giving written notice of that change to the other.

13. GOVERNING LAW AND MODIFICATION. This Guaranty shall be deemed to be made
under, and shall be governed by, the laws of the State of California in all
respects, including matters of construction, validity, performance and
enforcement, and its terms and provisions may not be waived, altered, modified
or amended except in writing duly signed by an authorized officer of
Design-Builder and by Guarantor.

14. INVALIDITY. If any provision of this Guaranty contravenes or is held invalid
under the laws of any jurisdiction, this Guaranty shall be construed as though
it did not contain that provision, and the rights and liabilities of the parties
to this agreement shall be construed and enforced accordingly.

15. HEADINGS. Headings in this Guaranty are for convenience only and shall not
be used to interpret or construe its provisions.

16. COUNTERPARTS. This Guaranty may be executed in two or more counterparts,
each of which shall be deemed an original but all of which together shall
constitute one and the same instrument.

IN WITNESS WHEREOF, the undersigned have executed this Guaranty on this 3rd day
of November 2005.


                                       4




<PAGE>
of November 2005.
                                        GUARANTOR:

                                        ---------------------------


                                        By: Neil M. Koehler
                                        ---------------------------

                                        Address for Notices to Guarantor:
                                        2429 Bucklebury
                                        ---------------------------
                                        Davis, CA  95616
                                        ---------------------------



                                        SPONSOR:
                                        Pacific Ethanol California, Inc.


                                        By /s/ Ryan Turner
                                        ---------------------------
                                        Address for Notices to Sponsor:
                                        5711 N. West Ave.
                                        ---------------------------
                                        Fresno, CA  93711
                                        ---------------------------


                                        ACKNOWLEDGED BY DESIGN-BUILDER:
                                        W.M. Lyles Co.

                                        By /s/ Michael A. Burson
                                        ---------------------------

                                        Address for Notices to Design-Builder:
                                        1210 W. Olive Ave.
                                        ---------------------------
                                        Fresno, CA  93728
                                        ---------------------------


                                       5