EXHIBIT 5.1 September 29, 1999 Plains All American Pipeline, L.P. 500 Dallas Suite 700 Houston, Texas 77002 Gentlemen: We have acted as counsel to Plains All American Pipeline, L.P., a Delaware limited partnership (the "Partnership"), and Plains All American Inc., a Delaware corporation and the general partner of the Partnership, in connection with the registration under the Securities Act of 1933, as amended (the "Act"), of the offering and sale of up to an aggregate of 2,600,000 common units representing limited partner interests in the Partnership (the "Common Units"). As the basis for the opinion hereinafter expressed, we have examined such statutes, regulations, corporate records and documents, certificates of corporate and public officials, and other instruments as we have deemed necessary or advisable for the purposes of this opinion. In such examination we have assumed the authenticity of all documents submitted to us as originals and the conformity with the original documents of all documents submitted to us as copies. Based on the foregoing and on such legal considerations as we deem relevant, we are of the opinion that: 1. The Partnership has been duly formed and is validly existing as a limited partnership under the Delaware Revised Uniform Limited Partnership Act. 2. The Common Units will, when issued and paid for as described in the Partnership's Registration Statement on Form S-1 (File No. 333-86907) relating to the Common Units, as amended (the "Registration Statement"), be duly authorized, validly issued, fully paid and nonassessable, except as such nonassessability may be affected by the matters described in the prospectus included in the Registration Statement (the "Prospectus") under the caption "The Partnership Agreement--Limited Liability." We hereby consent to the use of this opinion as an exhibit to the Registration Statement and to the reference to us under the caption "Validity of the Common Units" in the Prospectus. Very truly yours, /s/ Andrews & Kurth L.L.P. -------------------------------- Andrews & Kurth L.L.P.