<PAGE>
                                                                   EXHIBIT 10.21



                     THIRD AMENDMENT TO AMENDED AND RESTATED
                                CREDIT AGREEMENT


        THIS THIRD AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT is entered
into as of April 29, 2002 by and among PENFORD CORPORATION, a Washington
corporation, PENFORD PRODUCTS CO., a Delaware corporation, KEYBANK NATIONAL
ASSOCIATION, U.S. BANK NATIONAL ASSOCIATION and THE BANK OF NOVA SCOTIA.

                                    RECITALS

        Borrowers, Administrative Lender and Lenders are parties to that certain
Amended and Restated Credit Agreement dated November 15, 2000 (as previously
amended, the "Agreement"). The parties desire to amend the Agreement in the
manner set forth herein. All capitalized terms used herein and not otherwise
defined herein shall have the meaning attributed to them in the Agreement.

        NOW, THEREFORE, in consideration of the mutual covenants and promises of
the parties contained herein, Administrative Lender, Lenders and Borrowers
hereby agree as follows:

        1.     DEFINITIONS. The following definitions in Section 1.1 are amended
in their entirety to read as follows:

               "EBITDA" means, as of the end of a fiscal quarter, Parent's
        consolidated net income after taxes for the twelve months ending with
        such quarter plus (A) the sum of the amounts for such twelve month
        period included in determining such net income of (i) interest expense,
        (ii) income tax expense, (iii) depreciation expense, (iv) amortization
        expense, (v) unusual non-cash charges, extraordinary non-cash losses and
        other non-recurring non-cash charges, and (vi) the portion of any
        unusual cash charges, extraordinary cash losses and other non-recurring
        cash charges accrued but not paid during such period less (B) the sum of
        the following amounts for such twelve month period: (w) gains on sales
        of assets (excluding sales of inventory in the ordinary course of
        business); (x) unusual non-cash gains, extraordinary non-cash gains and
        other non-recurring non-cash gains; and (y) all unusual cash charges,
        extraordinary cash losses and other non-recurring cash charges paid
        during such period that were accrued prior to such period.

               "EBITDAR" means, as of the end of a fiscal quarter, the sum of
        EBITDA plus Parent's consolidated rental expense for the twelve months
        ending with such quarter.

               "EXCESS CASH FLOW" means, with respect to any fiscal year of
        Parent, EBITDA for such year, minus (A) cash interest expense paid
        during such year, (B) cash taxes paid during such year, (C) capital
        expenditures made during such year



                                                                          PAGE 1
<PAGE>

        permitted under Section 10.5 and not financed with Debt (other than
        Loans), (D) cash payments during such year of amounts described in
        Section 9.3 and permitted by Section 9.3, (E) payments made during such
        year under items (i) and (ii) of Section 3.2(b), (F) if during such year
        Borrowers take action under Section 3.1(e), the amount by which the
        Revolving Loan Commitment on the last day of such year (after being
        reduced by such action) is less than the peak outstanding principal
        balance of the Revolving Loans during such year, (G) payments made
        during such year under Section 11.1 of that certain Debenture Trust Deed
        dated November 15, 2000 between Penford Holdings and ANZ Capel Court
        Limited ACN 004 768 807, and (H) if during such year Penford Australia
        takes action under Section 13.2 of that certain Syndicated Facility
        Agreement dated November 15, 2000 among Penford Australia, ANZ and
        certain other lenders named therein, the amount by which the "Total
        Commitment" (as defined in such agreement) on the last day of such year
        (after being reduced by such action) is less than the peak outstanding
        principal balance of the "Outstanding Bill Amount" (as defined in such
        agreement) during such year.

               "FIXED CHARGE COVERAGE RATIO" means, as of the end of a fiscal
        quarter, the ratio of (A) EBITDAR, less the sum of the following for the
        twelve month period ending with such quarter: (i) all expenses of Parent
        and the Subsidiaries that were permitted under Sections 9.3 and 10.5 and
        were paid in cash during such period; and (ii) taxes paid in cash by
        Parent and the Subsidiaries during such period to (B) the sum of
        Interest Expense, Rental Expense and scheduled principal payments of
        Debt for such period.

               "RENTAL EXPENSE" means, as of the end of a fiscal quarter,
        Parent's consolidated cash rental expense for the twelve months ending
        with such quarter.

        2.     EFFECTIVE DATA. This Third Amendment shall be effective as of
February 28, 2002.

        3.     RATIFICATION. Except as otherwise provided in this Third
Amendment, all of the provisions of the Agreement are hereby ratified and
confirmed and shall remain in full force and effect.

        4.     ONE AGREEMENT. The Agreement, as modified by the provisions of
this Third Amendment, shall be construed as one agreement.

        5.     COUNTERPARTS. This Third Amendment may be executed in any number
of counterparts, each of which when executed and delivered shall be deemed to be
an original, and all of which when taken together shall constitute one and the
same agreement. Delivery of an executed signature page of this Third Amendment
by facsimile transmission shall be effective as delivery of a manually executed
counterpart hereof.



                                                                          PAGE 2
<PAGE>

        5.     STATUTORY NOTICE.

        ORAL AGREEMENTS OR ORAL COMMITMENTS TO LOAN MONEY, EXTEND CREDIT OR
FOREBEAR FROM ENFORCING REPAYMENT OF A DEBT ARE NOT ENFORCEABLE UNDER WASHINGTON
LAW.

        IN WITNESS WHEREOF, this Third Amendment to Amended and Restated Credit
Agreement has been duly executed as of the date first written above.


PENFORD CORPORATION                       PENFORD PRODUCTS CO.


By: /s/ Jeffrey T. Cook                   By: /s/ Jeffrey T. Cook
    ------------------------------            ------------------------------
Title: President                          Title: President
       ---------------------------               ---------------------------


KEYBANK NATIONAL ASSOCIATION              U.S. BANK NATIONAL ASSOCIATION


By: /s/ Cheryl L. Ebner                   By: /s/ James R. Farmer
    ------------------------------            ------------------------------
Title: Senior Vice President              Title: Vice President
       ---------------------------               ---------------------------


                                          THE BANK OF NOVA SCOTIA


                                          By: /s/ Patrik Norris
                                              ------------------------------
                                          Title: Director
                                                 ---------------------------



                                                                          PAGE 3
<PAGE>

                                 CONSENT OF ANZ

        Australian and New Zealand Banking Group Limited hereby consents to the
foregoing Third Amendment to Amended and Restated Credit Agreement.

        Dated: April 29, 2002.

                                        AUSTRALIAN AND NEW ZEALAND BANKING
                                        GROUP LIMITED


                                        By: /s/ Michael Stapleton
                                            --------------------------------
                                        Title: Analyst
                                               -----------------------------



                                                                          PAGE 4