Marine Executive Officer
Historically on Earth, the marine forces or marine corps have infantry forces that are part of the relevant country's navy. However, in Starfleet, the Marine Corps are their own, separate, command. Whilst this means that the ship or facility's Commanding Officer trumps the Marine XO on any ship-based duties, and the ship's Chief of Security trumps the Marine XO on any ship-board security issues, all orders to the Marine XO must pass first through the Marine CO for them to be valid.
Tasks undertaken by marines have included assisting in the provision of security in a starship while in deep space - reflecting the pressed nature of the ships' company and the risk of mutiny. Other tasks would include boarding of vessels during combat or capture of prize ships and providing manpower for raiding ashore in support of the naval objectives. Marine elements would also contribute to any campaigns on the ground (officially termed to be 'ashore'), in support of the military objective.