1 [LETTERHEAD OF KIRKLAND & ELLIS] EXHIBIT 5.1 June 2, 1998 Huntway Refining Company 25129 The Old Road, Suite 322 Newhall, California 91381 Re: Huntway Refining Company Registration Statement on Form S-8 ---------------------------------- Ladies and Gentlemen: We are acting as special counsel to Huntway Refining Company, a Delaware corporation (the "Company"), in connection with the proposed registration by the Company of 5,957,750 shares (the "Shares") of its Common Stock, par value $.01 per share (the "Common Stock"), pursuant to a Registration Statement on Form S-8 filed with the Securities and Exchange Commission (the "Commission") on the date hereof under the Securities Act of 1933, as amended (the "Act") (the "Registration Statement"). The Shares are issuable by the Company to certain directors of the Company and employees of the Company and its subsidiaries pursuant to (i) certain options granted to employees of Huntway Partners, L.P., the Company's predecessor (the "Partnership"), pursuant to Long Term Incentive Plan Grant Agreements (the "Predecessor Grant Agreements") and (ii) the Company's 1998 Stock Incentive Plan (the "Plan"). In rendering the opinion contained in this letter, we have assumed without investigation that the information supplied to us by the Company and the Partnership is accurate and complete. Based upon and subject to the foregoing, it is our opinion that each share of Common Stock registered by means of the Registration Statement, when issued pursuant to the Predecessor Grant Agreements or the Plan (as applicable), will be legally issued and, provided the consideration received by the Company for such share equals or exceeds its par value, fully paid and non-assessable. We hereby consent to the filing of this opinion as Exhibit 5.1 to the Registration Statement. Very truly yours, /s/ Kirkland & Ellis KIRKLAND & ELLIS