
<PAGE>
 
                                                                     EXHIBIT 5.a

                                                                February 6, 1997


BW/IP, Inc.
200 Oceangate Blvd., Suite 900
Long Beach, California 90802

Dear Sirs:

As General Counsel of BW/IP, Inc., a Delaware corporation (the "Company"), I
have participated in the preparation of the Registration Statement on Form S-8
(the "Registration Statement") to be filed under the Securities Act of 1933 (the
"Act") relating to 1,550,000 aggregate number of shares of the Company's Common
Stock, par value $.01 per share (the "Common Stock"), to be issued pursuant to
the BW/IP, Inc. Non-Employee Directors Stock and Deferred Compensation Plan and
the BW/IP, Inc. 1996 Long-Term Incentive Plan (the "Plans").

I have examined the originals, or copies certified or otherwise identified to my
satisfaction, of the Plans and such other corporate records, documents,
certificates or other instruments as in my judgment are necessary or appropriate
to enable me to render the opinion set forth below.

Based on the foregoing, I am of the opinion that authorized but not previously
issued shares of Common Stock which may be issued under the Plans have been duly
authorized and when issued in accordance with the terms of the Plans will be
validly issued, fully paid and non-assessable.

I hereby consent to the filing of this opinion as an exhibit to the Company's
Registration Statement.  In giving such consent, I do not thereby admit that I
am within the category of persons whose consent is required under Section 7 of
the Securities Act of 1933 or the rules and regulations of the Securities and
Exchange Commission thereunder.

                            Very truly yours,



                            /s/ JOHN D. HANNESSON
                            ---------------------------
                                John D. Hannesson
                                Vice President, General
                                Counsel and Secretary
