Flight Crew Instrument; Flight Crew Multiengine
Flight Crew Last 90 Days 60; Flight Crew Total 2660; Flight Crew Type 500
Situational Awareness; Distraction; Communication Breakdown; Confusion
ATC Issue All Types; Conflict Ground Conflict; Critical; Deviation / Discrepancy - Procedural Published Material / Policy; Ground Incursion Runway
Air Traffic Control Issued New Clearance; Flight Crew Requested ATC Assistance / Clarification
Human Factors; Procedure
ATC Tower instructed Aircraft X the following directions:Tower: Aircraft X cross Runway 8L at Echo Taxi Bravo Delta to 4L at Delta.	Aircraft X: Cross 8L Bravo Delta.Tower: Aircraft X; 4L at Delta Line up and Wait.Aircraft X: 4L at Delta Line up and Wait.Tower: Aircraft Y cleared for takeoff 4L at Foxtrot.I am already lined up and waiting on 4L at Delta one taxi way down the departure end of the runway.He then instructs Aircraft Y to do a 180 and exit 4L on foxtrot.I query tower; Aircraft X; 180 to 4L at Foxtrot?Aircraft X: 180 to 4L at Foxtrot?Tower instructs: Aircraft X to depart Runway 4L.In the air tower gives me a number to call.It is clear that tower instructed us to cross Runway 8L taxi via Bravo then Delta. There is no instruction to hold short at Delta other than when ground instructed us to hold 4L at Delta on our initial taxi instructions.Then Tower instructs me to taxi to 4L at Delta and 'Line up and wait for spacing.'I am lined up and waiting when Tower clears Aircraft Y for takeoff on Runway 4L at foxtrot. This is after he has instructed me to line up and wait on 4L. I am on the Runway 4L lined up as instructed; when he tells Aircraft Y to do a 180 and exit onto foxtrot. I repeated and queried tower 3 times: 'line up and wait[?]'; he came back 'Aircraft X Line up and Wait 4L Delta.'It is clear that Tower put me on the runway before Aircraft Y and then cleared Aircraft Y after I was already in front of Aircraft Y. I had the clear instructions from Tower; which I repeated clearly. And when I mistook Aircraft Y for my call sign I repeated the instructions again. This was the Tower's error and it could have been a disaster; since he cleared Aircraft Y for departure after we were already lined up and waiting thus could not see him when we entered the runway.Very poor job on the part of ZZZ Tower; thank goodness there was no accident.
Pilot reported that a Tower Controller instructed them to line up and wait while clearing another aircraft to takeoff on the same runway; resulting in a ground conflict.