1 EXHIBIT 5.1 [LETTERHEAD OF HADDAN & ZEPFEL LLP] May 21, 1999 Modtech Holdings, Inc. 2830 Barrett Avenue Perris, CA 92571 Dear Sirs: You have requested our opinion with respect to certain matters in connection with the filing by Modtech Holdings, Inc. (the "Company") of a Registration Statement on Form S-8 (the "Registration Statement") with the Securities and Exchange Commission, covering the registration of up to 1,639,909 shares of the Company's Common Stock, $0.01 par value (the "Shares"), for issuance pursuant to (i) the Agreement and Plan of Reorganization and Merger, dated September 28, 1998, and (ii) the Modtech Holdings, Inc. 1999 Nonstatutory Stock Option Plan (collectively, the "Stock Option Plans"). In connection with this opinion, we have examined and relied upon the Registration Statement, the Company's Certificate of Incorporation and Bylaws, the Stock Option Plans, and the originals or copies certified to our satisfaction of such records, documents, certificates, memoranda and other instruments as in our judgment are necessary or appropriate to enable us to render the opinion expressed below. We have assumed the genuineness and authenticity of all documents submitted to us as originals, the conformity to originals of all documents submitted to us as copies thereof and the due execution and delivery of all documents where due execution and delivery are a prerequisite to the effectiveness thereof. On the basis of the foregoing, and in reliance thereon, we are of the opinion that the Shares, when sold and issued in accordance with the Registration Statement and the Stock Option Plans, will be validly issued, fully paid, and nonassessable shares of Common Stock of the Company. We consent to the filing of this opinion as an exhibit to the Registration Statement. Very truly yours, /s/ Haddan & Zepfel LLP ---------------------------------- Haddan & Zepfel LLP