Updated from 8:59 am EDT.

A cancer immunotherapy shocker has Bristol-Myers Squibb(BMY) - Get Report tumbling and rival Merck(MRK) - Get Report soaring on Friday morning.

Bristol's blockbuster checkpoint inhibitor Opdivo failed to meet the primary endpoint in a very important phase III clinical trial involving patients with newly diagnosed non-small cell lung cancer, the company announced.

Bristol shares plummeted 17% to $62.37 in Friday trading. That's a loss of $22 billion in market value on the Opdivo disappointment.

Merck's stock price shot up 7% to $61.79 Friday, or a gain of nearly $12 billion in market value. The Opdivo setback is seen as a win for the company's competing checkpoint inhibitor Keytruda.

More people die of lung cancer than any other cancer type, which is why lung cancer is considered the largest and most important commercial opportunity for drug companies developing new immunotherapies. 

Peak revenue estimates for Bristol's Opdivo in lung cancer, alone, were in the range of $12 billion to $15 billion, with the bulk of those sales expected to come from treating patients with newly diagnosed, or first-line, lung cancer. This is why Friday's clinical trial failure is so shocking and the market reaction to Bristol's stock price so violent. 

Merck has previously presented positive clinical trial data on Keytruda in a segment of first-line lung cancer patients. Use of the drug in these patients could grow now that Opdivo has been hit with a setback. 

Bristol gambled and lost on a riskier Opdivo  study which enrolled patients with lung cancer containing low levels of a protein known as PD-L1. Merck took a more conservative approach with its Keytruda study by restricting enrollment to patients with lung tumors expressing high levels of PD-L1. 

Checkpoint inhibitors like Keytruda and Opdivo work by blocking the interaction between PD-L1, a protein found on the surface of tumor cells. with PD-1, a receptor found on immune cells. Blocking the PD-1/PD-L1 connection allows a patient's immune system to recognize and kill cancer cells.

Bristol could rebound from Friday's setback with an ongoing phase III study of lung cancer patients treated with a combination of Opdivo and its other cancer immunotherapy Yervoy. But results from this study are not expected until early 2018.

The failure of the first-line lung cancer study erases $4 to $4.5 billion from Bristol's Opdivo revenue forecasts, said Evercore ISI analyst Mark Schoenebaum in an email to clients Friday. Conversely, approximately $4 billion in added potential revenue now becomes available to Merck, he said. 

Adam Feuerstein writes regularly for TheStreet. In keeping with company editorial policy, he doesn't own or short individual stocks, although he owns stock in TheStreet. He also doesn't invest in hedge funds or other private investment partnerships. Feuerstein appreciates your feedback; click here to send him an email.