Shore patrol

Shore patrol are service members who are provided to aid in security for the United States Navy, United States Coast Guard, United States Marine Corps, and the British Royal Navy while on shore. They are often temporarily assigned personnel who receive limited training in law enforcement and are commonly armed with a baton. Their primary function is to make certain that Sailors, Marines, and Coast Guardsmen on liberty do not become too rowdy. They will also provide assistance for Department of the Navy and U.S. Coast Guard uniformed personnel in relations with the civilian courts and police.
U.S. Legislation.
In accordance with Title 32: National Defense, PART 700—UNITED STATES NAVY REGULATIONS AND OFFICIAL RECORDS, 
Subpart I—The Senior Officer Present § 700.922 Shore Patrol: "...the senior officer present shall cause to be established, temporarily or permanently, in charge of an officer, a sufficient patrol of officers, petty officers, and noncommissioned officers to maintain order and suppress any unseemly conduct on the part of any person on liberty."