Inactive state-selective KRAS(G12C) inhibitors1-8 demonstrate a 30-40% response rate and result in approximately 6-month median progression-free survival in patients with lung cancer9. The genetic basis for resistance to these first-in-class mutant GTPase inhibitors remains under investigation. Here we evaluated matched pre-treatment and post-treatment specimens from 43 patients treated with the KRAS(G12C) inhibitor sotorasib. Multiple treatment-emergent alterations were observed across 27 patients, including alterations in KRAS, NRAS, BRAF, EGFR, FGFR2, MYC and other genes. In preclinical patient-derived xenograft and cell line models, resistance to KRAS(G12C) inhibition was associated with low allele frequency hotspot mutations in KRAS(G12V or G13D), NRAS(Q61K or G13R), MRAS(Q71R) and/or BRAF(G596R), mirroring observations in patients. Single-cell sequencing in an isogenic lineage identified secondary RAS and/or BRAF mutations in the same cells as KRAS(G12C), where they bypassed inhibition without affecting target inactivation. Genetic or pharmacological targeting of ERK signalling intermediates enhanced the antiproliferative effect of G12C inhibitor treatment in models with acquired RAS or BRAF mutations. Our study thus suggests a heterogenous pattern of resistance with multiple subclonal events emerging during G12C inhibitor treatment. A subset of patients in our cohort acquired oncogenic KRAS, NRAS or BRAF mutations, and resistance in this setting may be delayed by co-targeting of ERK signalling intermediates. These findings merit broader evaluation in prospective clinical trials.