Lt were the top offers on the ships bellow commanders. Before the English Restoration Lieutenants were appointed by their Captains, and this inevitably led to abuses and to the widespread appointment of men of insufficient qualification. In 1677 Samuel Pepys introduced the first examination for Lieutenant, from the rank of Midshipman, and it is from the date of this examination that their seniority was set. Lieutenants were numbered by their seniority within the ship, so that a frigate, which was entitled to three would have a First Lieutenant, a Second Lieutenant, and a Third Lieutenant. A first-rate was entitled to six, and they were numbered accordingly. At first a Lieutenant's commission was given only for the ship in which he served, but after the loss of HMS Wager and the subsequent mutiny, Lieutenants were given commissions upon passing their examination.
During the early days of the naval rank, a Lieutenant might be very junior indeed, or might be on the cusp of promotion to Captain. Historically the Lieutenants in a ship were ranked in accordance with seniority, with the most senior being termed the First Lieutenant and acting as the second-in-command. An Acting Lieutenant is a midshipman unofficaly promoted my his captain, same idea as a acting captain.