Please wait

QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5(a)

GRAPHIC

August 14, 2020

MDU Resources Group, Inc.
1200 West Century Avenue
P.O. Box 5650
Bismarck, North Dakota 58506-5650

        Re:    Registration Statement on Form S-3 Filed by MDU Resources Group, Inc.

Ladies and Gentlemen:

        We have acted as counsel to MDU Resources Group, Inc., a Delaware corporation (the "Company"), in connection with the preparation and filing with the Securities and Exchange Commission (the "Commission") pursuant to the Securities Act of 1933, as amended (the "Securities Act"), and the rules and regulations promulgated thereunder, of a registration statement on Form S-3 (the "Registration Statement") for the registration of the sale from time to time of one or more series of the following securities by the Company (collectively, the "Securities"):

        In our capacity as counsel to the Company, we have examined the Registration Statement and such documents, records and instruments as we have deemed necessary for the purposes of this opinion. As to matters of fact material to the opinions expressed herein, we have relied on (a) information in public authority documents (and all opinions based on public authority documents are as of the date of such public authority documents and not as of the date of this opinion letter), and (b) information provided in certificates of officers of the Company. We have not independently verified the facts so relied on.

        In such examination, we have assumed the following without investigation: (a) the authenticity of original documents and the genuineness of all signatures; (b) the conformity to the originals of all documents submitted to us as copies; and (c) the truth, accuracy and completeness of the information, representations and warranties contained in the records, documents, instruments and certificates we have reviewed.

        Based upon the foregoing examination and in reliance thereon, and subject to (a) the assumptions stated and in reliance on statements of fact contained in the documents that we have examined and (b) completion of all corporate action required to be taken by the Company to duly authorize each


proposed issuance of Securities (including the due reservation of any shares of Common Stock or Preferred Stock for issuance upon conversion or exchange of any other Securities), we are of the opinion that:


        The foregoing opinions are subject to the following exclusions and qualifications:

        We hereby consent to the filing of this opinion as an exhibit to the Registration Statement and any amendments thereto, including any and all post-effective amendments, and to the reference to our firm in the prospectus and any prospectus supplements relating thereto under the heading "Legal Matters." In giving such consent, we do not thereby admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act or related rules and regulations of the Commission issued thereunder.

 

Very truly yours,

 

/s/ PERKINS COIE LLP




QuickLinks