1
                [MURTHA, CULLINA, RICHTER AND PINNEY LETTERHEAD]



                                   May 3, 1996



Securities and Exchange Commission
450 Fifth Street, N.W.
Judiciary Plaza
Washington, D.C. 20549

         Re:  ACMAT Corporation:  Registration Statement on Form S-4

Ladies and Gentlemen:

         We have acted as counsel for ACMAT Corporation, a Connecticut
corporation (the "Company"), in connection with the proposed issuance by the
Company of up to an aggregate of 1,111,459 shares of the Company's Class A
Stock, without par value ("Class A Stock"), pursuant to the terms of an
Agreement and Plan of Liquidation and Merger (the "Merger Agreement") by and
between the Company and its subsidiary, United Coasts Corporation, a Delaware
corporation ("United Coasts"), providing for the merger of United Coasts with
and into the Company (the "Merger"), as described in the Company's Registration
Statement on Form S-4 being filed this day under the Securities Act of 1933, as
amended.

         We are familiar with the action taken by the Company to date with
respect to the approval and authorization of the Merger and the reservation of
1,111,459 shares of Class A Stock for issuance pursuant thereto, all of which is
described in the Registration Statement. We have examined originals, or copies
certified or otherwise authenticated to our satisfaction, of such corporate
records of the Company, agreements and other instruments, certificates of public
officials, officers and representatives of the Company and such other documents
as we have deemed necessary as a basis for the opinions hereinafter expressed.
We are furnishing this opinion in connection with the filing of the Registration
Statement.

         Based upon the foregoing, we are of the opinion that, upon the
effectiveness of the Registration Statement and satisfaction of the conditions
to the Merger set forth in the Merger Agreement, the 1,111,459 shares of Class A
Stock proposed to be issued by the Company pursuant to the Merger will, when
issued in
   2
Securities and Exchange Commission
May 3, 1996
Page 2

accordance with the terms of the Merger Agreement, be legally issued, fully paid
and nonassessable.

         We hereby consent to the inclusion of this opinion as an exhibit in the
Registration Statement and to the reference to our firm under the caption "Legal
Matters" in the prospectus constituting a part of the Registration Statement.

                                           Very truly yours,

                                           MURTHA, CULLINA, RICHTER AND PINNEY



                                           By   /s/ Willard F. Pinney, Jr.
                                             -----------------------------------
                                             Willard F. Pinney, Jr.
                                             A Partner of the Firm