Regulations for the Government of the Navy of the United States 1876
Chapter III. Rank and Command
Section II. Petty Officers

1. The Petty Officers of the Navy shall be divided into two classes; Petty Officers of the Line and Petty Officers.

The class of Petty Officers of the Line, and to the order of rank, with the order of their succession to command, shall be as follows:
1. Boatswain's Mates.
2. Gunner's Mates.
3. Signal Quartermaster.
4. Cockswain to the Commanding Officer.
5. Captains of Forecastle.
6. Quartermasters.
7. Quarter Gunners.
8. Cockswains.
9. Captains of Maintop.
10. Captains of Foretop.
11. Captains of Mizzentop.
12. Captains of Afterguard.

2. All other Petty Officers, except the Master-at-Arms, who will be the chief Petty Officer in the vessel in which he serves, will be called Petty Officers, and shall take precedence and have assimilated rank as follows;
Ship's Yeoman,
Engineer's Yeomen,
Paymaster's Yeoman,
Master of the Band,
Ship Writers,
To rank next after the Master-at-Arms.
Carpenter's Mates,
Sailmaker's Mates,
To rank next after Gunner's Mates.
Armorer's Mates,
Ship's Corporals,
Captains of Hold,
Ship's Cook,
To rank next after Captain of Afterguard.

3. Petty Officers are not to exercise authority except in the department to which they belong, or over those placed immediately under their control, and precedence among those of the same rare; shall be established by the commanding officer.

4. Orderly Sergeants of Marines shall rank next after Master-at-Arms; all other Sergeants with Gunner's Mates; and all Corporals with Captain of Afterguard.

5. Non-commissioned officers of Marines are not to exercise military authority or command over those not of their corps unless on guard or police duty, or when specially authorized so to do by the commanding officer of the vessel or station.

6. When serving afloat, Petty Officer of the Navy shall take precedence of non-commissioned officers of Marines holding the same relative rank; but when serving as troops on shore, the non-commissioned officers shall take precedence.

Regulations for the Government of the Navy of the United States 1876, Washington: Government Printing Office, 1877.