Acting first officer

The position of acting first officer was bestowed upon an officer or another individual aboard a starship when the ship's regular first officer was unable to fulfill his duties.

In an alternate 2258, created by the Romulan Nero,  of the USS Enterprise (NCC-1701 alternate reality) appointed Commander  acting captain and Lieutenant  as first officer when Pike left the ship to confront Nero. Subsequently, Kirk proved that Spock was unable to perform his duties and then Kirk himself was made acting captain. After everything was over, Kirk was promoted to the rank of captain and given regular command of the ship. 

Lieutenant Commander Data was made the acting first officer, after the disappearance of Captain Jean-Luc Picard in 2370. 

Lieutenant Tom Paris fit the role of acting first officer, after Captain Kathryn Janeway was assimilated by the Borg in 2377.