Eligibility Criteria:
Inclusion Criteria:
* Histologically confirmed NSCLC with an associated G12A, G12D, G12F, G12R, G12S, G12V, or G13D KRAS mutation, or, any pathogenic KRAS mutation other than G12C, as determined by a Sponsor-approved laboratory
* Male or female patients at least 18 years of age
* Advanced unresectable recurrent or metastatic disease not amenable to local treatment with surgery or radiotherapy
* Documented disease progression after at least one line of prior SoC therapy
* Presence of measurable disease on computed tomography (CT) or magnetic resonance imaging (MRI) scan as defined by RECIST v1.1. A previously irradiated lesion may be considered a target lesion if clearly progressing
* Previous systemic anticancer treatment completed ≥ 3 weeks, major surgery ≥ 2 weeks, and radiation therapy ≥ 4 weeks prior to study enrollment
* Any adverse effects from prior surgery, radiotherapy, or antineoplastic therapy must have improved to Grade 1 or less by the time of enrollment
* ECOG performance status 0-2 at the time of enrollment
* Life expectancy at least 12 weeks
* Adequate bone marrow function as evidenced by meeting all the following requirements:
* Absolute neutrophil count (ANC) ≥ 1500 cells/μL without the use of hematopoietic growth factors within the last 2 weeks before screening
* Platelet count 100,000 cells/μL without the use of platelet transfusion within the last 2 weeks before screening
* Hemoglobin ≥ 9 g/dL without the use of red blood cell (RBC) transfusion within the last 2 weeks before screening
* Adequate hepatic function as evidenced by meeting all the following requirements:
* Serum total bilirubin ≤ 1.5 × upper limit of normal (ULN), unless explicitly related to documented Gilbert's syndrome
* Aspartate aminotransferase (AST), alanine aminotransferase (ALT) ≤ 3 × ULN; if liver metastases are present, then ≤ 5 × ULN is allowed
* Adequate renal function as evidenced by an estimated glomerular filtration rate (eGFR) ≥ 60 mL/min/1.73 m2 of body surface area.
* Female patients of childbearing potential (FCBP) must present with a negative serum pregnancy test and must agree to employ adequate birth control measures for the duration of the study and until 3 months after the end of last dose of the study drug. Female patients who are lactating must agree to stop breastfeeding from the start of study treatment until 1 month after the end of treatment. Lack of childbearing potential is indicated by \> 12 months without menses, or after surgical sterility, or as indicated by follicle-stimulating hormone (FSH) concentration.
* Male patients must be surgically sterile or agree to use a double-barrier contraception method or abstain from heterosexual activity with an FCBP starting at the first dose of treatment and until 3 months after the last dose of the study drug. Male patients must also agree to refrain from sperm donation, storage, or banking during these same time periods.
* Patient is willing and able to comply with the requirements of the study protocol.
Exclusion Criteria:
* Previous treatment with sotorasib or any experimental anti-KRAS targeted agent, and/or previous treatment with gemcitabine
* Documented KRAS G12C mutation and previously untreated with sotorasib
* Existing Grade 2 or higher retinal conditions (e.g., retinal tear, exudate, hemorrhage)
* Existing Grade 2 or higher neurological condition (tremor, ataxia, hypotension, confusion)
* Significant intercurrent illnesses and/or any of the following:
* Active uncontrolled peptic ulcer disease
* Uncontrolled seizure disorders
* Active and uncontrolled CNS metastases (indicated by clinical symptoms, cerebral edema, corticosteroid and/or anticonvulsant requirement, or progressive disease); for controlled CNS metastases, patient should have been off corticosteroids for at least 14 days or on a tapering or stable dose of corticosteroids at a maximum dose of 12 mg/day prednisone-equivalent, without overt evidence of significant neurological deficits prior to enrollment
* Significant cardiac conduction abnormalities, including known familial prolonged QT syndrome, or screening QTcF \> 480 msec
* Symptoms of congestive heart failure Grade 2 or higher
* Active, uncontrolled bacterial, fungal, or viral infection or an unexplained fever \> 38.5°C which in the investigator's opinion might compromise the patient's participation in the study
* Known history of difficulty swallowing, malabsorption, or other conditions that may reduce absorption of the product
* Chronic Grade ≥ 2 diarrhea
* Presence or history of any other active malignancy within 2 years other than a history of adequately treated basal or squamous cell carcinoma of the skin, or any adequately treated in situ carcinoma
* Active known human immunodeficiency virus ( HIV), hepatitis B virus (HBV), or hepatitis C virus (HCV) infection. Active hepatitis B is defined as positive hepatitis B surface antigen (HBsAg) or immunoglobulin (Ig)M hepatitis B core antibody (anti-HBc) with or without positive HBV DNA. Active hepatitis C is defined as positive HCV RNA and/or anti-HCV antibody. HIV test according to local practice and local regulatory guidance
* Female patient who is pregnant or lactating at the time of enrollment
* Any other medical or social condition deemed by the investigator to be likely to interfere with a patient's ability to cooperate and participate in the study or interfere with the interpretation of the results.