(Reuters) - Pfizer Inc (>> Pfizer Inc.) is buying Anacor Pharmaceuticals Inc (>> Anacor Pharmaceuticals Inc) in a $5.2 billion deal to add an eczema gel to its portfolio, just a month after the U.S. drug major scrapped plans to acquire Allergan Plc (>> Allergan, Inc.).

Anacor shares surged more than 55 percent to $99.48 in late morning trading on Monday, above the offer price of $99.25 per share in cash. The net-of-cash deal value assumes conversion of Anacor's outstanding convertible notes, the companies said in a statement.

The deal hints at a shift in Pfizer's M&A strategy from lowering taxes - the rationale behind its $160 billion bid for Dublin-based Allergan - to strengthening its drugs portfolio ahead of a decision on selling or spinning off its generic medicines by late 2016.

The recent pullback in valuations of biotech firms could stimulate Pfizer's appetite for deals, analysts said. The company is also reported to be in talks to buy cancer drug maker Medivation Inc (>> Medivation Inc).

The equity value of the Anacor deal is $4.45 billion, based on the company's outstanding fully diluted shares as of March 31. Anacor stock had fallen 43 percent this year to Friday's close.

The acquisition will give Pfizer access to a non-steroidal topical gel, crisaborole, which is currently under review by the U.S. Food and Drug Administration for the treatment of mild to moderate eczema.

Pfizer said it believed crisaborole had the potential to reach or exceed peak sales of $2 billion.

In the past 15 years, there have been no new molecules approved for eczema - or atopic dermatitis - a common, relapsing, inflammatory skin disorder that affects 18-25 million people in the United States.

SURPRISE BUYER

Some analysts said they had expected Anacor to be acquired by Allergan, which has a stronger presence in the dermatology market, or by Novartis AG's (>> Novartis AG) Sandoz unit, which sells Anacor's toenail fungus drug in the United States.

Wedbush analyst David Nierengarten, however, said that Pfizer was strong in primary care and pediatric treatments, the target markets for crisaborole.

He said other bids were possible, given that the $180.8 million termination fee was relatively low for a deal this size.

Pfizer's current inflammation and immunology drugs portfolio includes Enbrel and Xeljanz, which target auto-immune diseases.

Enbrel, marketed by the company outside North America, lost patent protection in Europe last year. The U.S. patents for the drug, sold in the country by Amgen Inc (>> Amgen, Inc.), are set to expire in 2028.

(Reporting by Amrutha Penumudi, additional reporting by Ankur Banerjee in Bengaluru; Editing by Kirti Pandey)

By Amrutha Penumudi