Pfizer today reported better than expected third-quarter earnings today, helped by cuts in costs and growing sales of recently approved cancer medicines.

The largest US drugmaker said it earned $2.59 billion, or 39 cents per share in the quarter. That compared with $3.21 billion, or 43 cents per share, the same time last year.

Excluding special charges of $572m related to restructurings, asset writedowns and other costs, Pfizer earned 58 cents per share. Analysts, on average, expected 56 cents per share, according to Thomson Reuters.

The bright spot in Pfizer's earnings report was sales of its oncology drugs, which jumped 24% in the quarter to $407m. 

Oncology has become one of Pfizer's biggest priorities, with the recent introductions of Xalkori for lung cancer, Inlyta for kidney cancer and Bosulif for chronic myelogenous leukemia.

Pfizer is counting on them to become lucrative products, and is developing other cancer medicines with possibly far bigger sales potential. They include an experimental treatment for advanced breast cancer, called palbociclib, which industry analysts consider a potential blockbuster.

Xalkori sales almost doubled to $73m in the quarter, while Inlyta sales nearly tripled to $83m.

Global company sales fell 2% to $12.64 billion, hurt by generic competition for cholesterol fighter Lipitor and other medicines. Wall Street had expected $12.7 billion. Sales would have been flat if not for the stronger dollar, which lowers the value of sales outside the US.

Sales of Pfizer's biggest product, Lyrica for nerve pain, rose 10% to $1.14 billion. Prevnar, a vaccine against pneumococcal bacteria that can cause pneumonia and other infections, grew 1% to $959m, a moderate turnaround from a 3% decline in the previous quarter.

But sales of Lipitor, which lost US patent protection in late 2011, fell 29% to $533m, as the drug faced generics in more overseas markets. But its sales topped Wall Street expectations by almost $55m, analysts said.

The largest US drugmaker forecast full-year 2013 earnings of $2.15 to $2.20 per share, excluding special items, from its earlier view of $2.10 to $2.20 per share.