EXHIBIT 5 February 14, 2007 Board of Directors Temecula Valley Bancorp Inc. 27710 Jefferson Avenue, Suite A100 Temecula, California 92590 Re: Registration Statement on Form S-3 Dear Gentlemen: We have acted as special counsel to Temecula Valley Bancorp Inc. (the "Company") in connection with the filing of a registration statement on Form S-3 (333-139908) to which this opinion is an exhibit (the "Registration Statement") with respect to the offer and sale by the security holders named in the Registration Statement (the "Selling Shareholders") of up to an aggregate of 1,400,569 outstanding shares of the Company's common stock, no par value (the "Shares"). In the course of our acting as special counsel to the Company, we have examined originals or copies of such corporate records of the Company and have made such examinations of law as we have deemed relevant. In our examinations, we have assumed and have not verified (i) the genuineness of all signatures (other than persons signing on behalf of the Company), (ii) the authenticity of all documents submitted to us as originals, (iii) the conformity with the originals of all documents supplied to us as copies, and (iv) the accuracy and completeness of all corporate records and documents made available to us by the Company, and (v) that the foregoing documents, in the form submitted to us for our review, have not been altered or amended in any respect material to our opinions stated herein. We have relied as to factual matters upon certificates from officers of the Company and certificates and other documents from public officials and government agencies and departments and we have assumed the accuracy and authenticity of such certificates and documents. Based on the foregoing, and subject to the assumptions, qualifications and limitations set forth herein, as of the date hereof we are of the opinion that the Shares are validly issued, fully paid and nonassessable. You have informed us that the Selling Shareholders may sell the Shares from time to time on a delayed or continuous basis. This opinion is limited to the California General Corporation Law ("California Code"), including the statutory provisions of the California Code, all applicable provisions of the Constitution of the State of California and all reported judicial decisions interpreting these laws, and federal law, exclusive of state securities and blue sky laws, rules and regulations. We hereby consent to the use of our name under the caption "Legal Matters" in the prospectus forming a part of the Registration Statement and to the filing of this opinion as Exhibit 5 to the Registration Statement. In giving this consent, we do not admit that we are within the category of persons whose consent is required under Section 7 of the Securities Act of 1933, as amended, or the General Rules and Regulations of the Securities and Exchange Commission. Sincerely, /s/ McANDREWS, ALLEN & MATSON, A.P.C. 33