The purpose of this study is to determine whether organ sparing and target coverage can be simultaneously maintained for pencil beam scanning (PBS) proton therapy treatment of thoracic tumors in the presence of motion, stopping power uncertainties, and patient setup variations. Ten consecutive patients that were previously treated with proton therapy to 66.6/1.8 Gy (RBE) using double scattering (DS) were replanned with PBS. Minimum and maximum intensity images from 4D CT were used to introduce flexible smearing in the determination of the beam specific PTV (BSPTV). Datasets from eight 4D CT phases, using ±3% uncertainty in stopping power and ±3 mm uncertainty in patient setup in each direction, were used to create 8×12×10=960 PBS plans for the evaluation of 10 patients. Plans were normalized to provide identical coverage between DS and PBS. The average lung V20, V5, and mean doses were reduced from 29.0%, 35.0%, and 16.4 Gy with DS to 24.6%, 30.6%, and 14.1 Gy with PBS, respectively. The average heart V30 and V45 were reduced from 10.4% and 7.5% in DS to 8.1% and 5.4% for PBS, respectively. Furthermore, the maximum spinal cord, esophagus, and heart doses were decreased from 37.1 Gy, 71.7 Gy, and 69.2 Gy with DS to 31.3 Gy, 67.9 Gy, and 64.6 Gy with PBS. The conformity index (CI), homogeneity index (HI), and global maximal dose were improved from 3.2, 0.08, 77.4 Gy with DS to 2.8, 0.04, and 72.1 Gy with PBS. All differences are statistically significant, with p‐values <0.05, with the exception of the heart V45 (p=0.146). PBS with BSPTV achieves better organ sparing and improves target coverage using a repainting method for the treatment of thoracic tumors. Incorporating motion‐related uncertainties is essential.PACS number: 87.55.D