Merck & Co. (NYSE:MRK) posted an unexpected increase in second-quarter revenue and an increased profit versus a year-earlier period. For the quarter, the company posted a profit of $1.21 billion, up 75 percent from $687 million a year earlier. Earnings rose to 43 cents a share from 24 cents a share. Excluding certain one-time costs, per-share earnings rose to 93 cents from 86 cents. Analysts forecast earnings of 91 cents a share on revenue of $9.78 billion, according to Thomson Reuters.

Sales grew 0.6 percent in the quarter, rising to $9.84 billion. Merck’s pharmaceutical revenue increased 1.6 percent to $8.7 billion. Much of the revenue boost was attributed to new cancer and hepatitis treatments. The U.S. Food and Drug Administration approved Merck’s new treatment, Zepatier, for hepatitis C in January. Zepatier had sales of $112 million, compared with $50 million in the first quarter.

Keytruda, which treats melanoma and lung cancer, posted sales of $314 million in the quarter, compared with $110 million in the same quarter last year. Merck is trying to expand the use of Keytruda. Its Keytruda development program includes 30 tumor types across more than 300 clinical trials.

Growth in hospital acute care, cardiovascular treatments and vaccines also helped results. Antibiotic Cubicin posted 22 percent sales growth. Combined sales of cardiovascular drugs Zetia and Vytorin grew 4 percent. Combined sales of Type 2 diabetes treatments Januvia and Janumet increased 2 percent. HPV vaccines Gardasil and Gardasil 9 fell 8 percent.

Merck faces sales declines in coming years for top drugs due to generic competition. Sales of allergy treatment Nasonex fell 53 percent in the first quarter after a generic version of the drug became available in the U.S. in March. Sales of Remicade, a treatment for inflammatory diseases, decreased 26 percent on competition from biosimilars.

Merck recently decided to exit the US allergy market, handing three products back to its partner ALK-Abello. Those products included Grastek and Ragwitek, under-the-tongue immunotherapy tablets approved in 2014, and a similar house dust mite product that filed for US approval in February. Sales for the products have not been disclosed by Merck.

The drugmaker also tightened its full-year 2016 financial forecast. Merck now projects adjusted earnings between $3.67 and $3.77 per share for the year on revenue between $39.1 billion and $40.1 billion. That is mostly in-line with analyst forecasts. Analysts had expected adjusted earnings of $3.72 a share on revenue of $39.49 billion.