Pfizer said Monday that it will partner with German drug and chemical maker Merck in developing potential cancer drugs in a hot new medication class that harnesses the body's immune system to fight cancer.

Under their agreement, New York-based Pfizer will pay Merck KGaA $850 million initially and up to $2 billion total, based on how many drugs are approved and future revenue levels.

Pfizer said it will take a charge for the $850 million payment, cutting into profit this year, so it's lowered its 2014 earnings forecast by a dime, to a range of $1.40 to $1.49 per share.

The two companies plan to develop drugs to fight multiple types, either alone or in combination with their other cancer treatments. They say they expect next year to start up to 20 patient testing programs of such immuno-oncology drugs.

Albert Bourla, head of Pfizer's cancer business, said "immuno-oncology is a top priority for Pfizer." While it is the world's second-biggest drugmaker by revenue, Pfizer only made a research focus several years ago.

Cancer drugs are far and away the top category worldwide by revenue, partly because of their high prices. Global sales exceeded $67 billion in 2013, according to health data firm IMS Health.

Immune oncology drugs use a mechanism to enable the immune system to "uncloak" hidden cancer cells in the body and then attack them. Potential drugs in the class are being tested by several major pharmaceutical companies, and Bristol-Myers Squibb Co. got the first one approved in July, when Japan allowed sales of its called Opdivo for inoperable melanoma.

Initially, Pfizer and Merck KGaA, based in Darmstadt, Germany, plan together to conduct patient testing and seek approval of a Merck experimental drug called MSB0010718C, an immune-oncology drug in a class called anti-PD-L 1 antibodies. The drug already has undergone initial testing in more than 550 patients with multiple types of cancer.

Pfizer's global research director, Mikael Dolsten, called the early results "impressive." Merck KGaA has released data showing some effectiveness in patients with ovarian cancer and non-small cell lung cancer, and plans more disclosures at medical conferences next year.

The two companies also will work together on early testing of Pfizer's immuno-oncology drug, an anti-PD-1 antibody.

They'll also jointly market Pfizer's drug Xalkori, which is approved in more than 75 countries for treating non-small cell lung cancer in patients with a certain genetic mutation. It only posted sales of $112 million in the first nine months of this year.