Eligibility Details:  
        Inclusion Criteria:
          1. Have Eastern Cooperative Oncology Group (ECOG) performance status of 0 to 2.
          2. Have histologically or cytologically confirmed stage IIIB (locally advanced or
             recurrent) or stage IV NSCLC.
          3. Must meet one of the following criteria:
               -  Have documentation of ALK rearrangement by a positive result from the Vysis ALK
                  Break-Apart fluorescence in situ hybridization (FISH) Probe Kit or the Ventana
                  ALK (D5F3) CDx Assay or Foundation Medicine's FoundationOne CDx.
               -  Have documented ALK rearrangement by a different test and be able to provide
                  tumor sample to the central laboratory. (Note: central laboratory ALK
                  rearrangement testing results are not required to be obtained before
                  randomization).
          4. Had PD while on crizotinib, as assessed by the investigator or treating physician.
             (Note: crizotinib does not need to be the last therapy a participant received. The
             participant may have received chemotherapy as his/her last therapy).
          5. Treatment with crizotinib for at least 4 weeks before progression.
          6. Have had no other ALK inhibitor other than crizotinib.
          7. Have had no more than 2 prior regimens of systemic anticancer therapy (other than
             crizotinib) in the locally advanced or metastatic setting. Note: a systemic anticancer
             therapy regimen will be counted if it is administered for at least 1 complete cycle. A
             new anticancer agent used as maintenance therapy will be counted as a new regimen.
             Neoadjuvant or adjuvant systemic anticancer therapy will be counted as a prior regimen
             if disease progression/recurrence occurred within 12 months upon completion of this
             neoadjuvant or adjuvant therapy. (Systemic therapy followed by maintenance therapy
             will be considered as one regimen if the maintenance therapy consists of a drug or
             drugs that were used in the regimen that immediately preceded maintenance).
          8. Have at least 1 measurable (that is, target) lesion per RECIST v1.1.
          9. Have recovered from toxicities related to prior anticancer therapy to national cancer
             institute common terminology criteria for adverse events (NCI CTCAE) v4.03 grade less
             than or equal to (<=)1. (Note: treatment-related alopecia or peripheral neuropathy
             that are grade greater than (>) 1 are allowed, if deemed irreversible).
         10. Have adequate organ function, as determined by:
               -  Total bilirubin <=1.5 times the upper limit of normal (ULN).
               -  Estimated glomerular filtration rate greater than equal to (>=) 30 milliliter per
                  minute (mL/min)/1.73 square meter [m^2], using the modification of diet in renal
                  disease equation.
               -  Alanine aminotransferase (ALT)/aspartate aminotransferase (AST) <=2.5*ULN;
                  <=5*ULN is acceptable if liver metastases are present.
               -  Serum lipase <=1.5*ULN.
               -  Platelet count >=75*10^9 per liter [/L].
               -  Hemoglobin >=9 gram per deciliter (g/dL).
               -  Absolute neutrophil count >=1.5*10^9 / L.
         11. Suitable venous access for study-required blood sampling (that is, including
             pharmacokinetic [PK] and laboratory safety tests).
        Exclusion Criteria:
          1. Had participated in the control (crizotinib) arm of Study AP26113-13-301 (ALTA 1L).
          2. Had received crizotinib within 7 days of randomization.
          3. Have a history or presence at baseline of pulmonary interstitial disease, drug related
             pneumonitis, or radiation pneumonitis.
          4. Have uncontrolled hypertension. Participants with hypertension should be under
             treatment for control of blood pressure upon study entry.
          5. Had received systemic treatment with strong cytochrome P-450 (CYP) 3A inhibitors,
             moderate CYP3A inhibitors, strong CYP3A inducers, or moderate CYP3A inducers within 14
             days before randomization.
          6. Treatment with any investigational systemic anticancer agents within 14 days or 5
             half-lives, whichever is longer, before randomization.
          7. Had received chemotherapy or radiation therapy within 14 days of randomization except
             for stereotactic radiosurgery (SRS) or stereotactic body radiation therapy.
          8. Had received antineoplastic monoclonal antibodies within 30 days of randomization.
          9. Had major surgery within 30 days of randomization. Minor surgical procedures, such as
             catheter placement or minimally invasive biopsies, are allowed.
         10. Have symptomatic CNS metastases (parenchymal or leptomeningeal) at screening
             (participants with asymptomatic brain metastases or participants who have stable
             symptoms and did not require an increased dose of corticosteroids to control symptoms
             within 7 days before randomization will be enrolled). Note: If a participant has
             worsening neurological symptoms or signs due to CNS metastasis, the participant needs
             to complete local therapy and be neurologically stable (with no requirement for an
             increasing dose of corticosteroids or use of anticonvulsants) for 7 days before
             randomization.
         11. Have current spinal cord compression (symptomatic or asymptomatic and detected by
             radiographic imaging). Participants with leptomeningeal disease and without cord
             compression are allowed.
         12. Have significant, uncontrolled, or active cardiovascular disease, specifically
             including, but not restricted to the following:
               -  Myocardial infarction within 6 months before randomization.
               -  Unstable angina within 6 months before randomization.
               -  New York Heart Association Class III or IV heart failure within 6 months before
                  randomization.
               -  History of clinically significant atrial arrhythmia (including clinically
                  significant bradyarrhythmia), as determined by the treating physician.
               -  Any history of clinically significant ventricular arrhythmia.
         13. Had cerebrovascular accident or transient ischemic attack within 6 months before first
             dose of study drug.
         14. Have malabsorption syndrome or other gastrointestinal illness or condition that could
             affect oral absorption of the study drug.
         15. Have an ongoing or active infection, including but not limited to, the requirement for
             intravenous antibiotics.
         16. Have a known history of human immunodeficiency virus (HIV) infection. Testing is not
             required in the absence of history.
         17. Known hepatitis B surface antigen-positive, or known or suspected active hepatitis C
             infection.
         18. Have a known or suspected hypersensitivity to brigatinib or alectinib or their
             excipients.
         19. Life-threatening illness unrelated to cancer.