Narrative:

After landing on runway xxr; we were instructed to hold short runway xxl. The first officer went off frequency to call company. Approaching the runway xxl hold short line; ZZZ tower cleared us to cross runway xxl. I acknowledged tower and continued across runway xxl. Several aircraft were holding short and one was in position for takeoff.since our aircraft was still in motion; little time was required to comply with the taxi clearance. Tower rescinded the taxi clearance and instructed us to hold short moments later. It was too late as we were already entering the runway environment. I elected to continue the taxi to expedite the only alternative to properly clearing the runway. Tower issued an abort instruction to the departing runway xxl aircraft.airport operations at several airports conduct very rapid serial communications; instructions and aircraft movements. Understandably; it's required for an efficient NAS environment. However; potentially significant errors can be introduced with scant time for detection and mitigation. Upon shutdown; I called the tower supervisor to learn what occurred. He had yet to review the tapes but indicated it was an ATC error. ZZZ tower did a very good job in correcting a dangerous situation. I don't know what systems tower controllers have and use to prevent such occurrences. Within the aircraft; I will ask the first officer to remain on tower or ground frequency until all runway crossings have been accomplished.

Google
 

Original NASA ASRS Text

Title: B737 flight crew reported that ATC cleared the aircraft to cross the runway while another aircraft was cleared to takeoff.

Narrative: After landing on RWY XXR; we were instructed to hold short RWY XXL. The First Officer went off frequency to call Company. Approaching the RWY XXL hold short line; ZZZ Tower cleared us to cross RWY XXL. I acknowledged Tower and continued across RWY XXL. Several aircraft were holding short and one was in position for takeoff.Since our aircraft was still in motion; little time was required to comply with the taxi clearance. Tower rescinded the taxi clearance and instructed us to hold short moments later. It was too late as we were already entering the runway environment. I elected to continue the taxi to expedite the only alternative to properly clearing the runway. Tower issued an abort instruction to the departing RWY XXL aircraft.Airport operations at several airports conduct very rapid serial communications; instructions and aircraft movements. Understandably; it's required for an efficient NAS environment. However; potentially significant errors can be introduced with scant time for detection and mitigation. Upon shutdown; I called the Tower Supervisor to learn what occurred. He had yet to review the tapes but indicated it was an ATC error. ZZZ Tower did a very good job in correcting a dangerous situation. I don't know what systems Tower Controllers have and use to prevent such occurrences. Within the aircraft; I will ask the First Officer to remain on Tower or Ground frequency until all runway crossings have been accomplished.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.