The Dow Jones Industrials (^DJI -0.12%) was down 50 points as of 12:30 p.m. EDT Thursday, extending the previous day's loss. With unrest in Iraq helping to boost energy prices, the prospects for consumers having to pay more at the pump and for businesses seeing their power costs rise are weighing on the overall market today. But one surprise is just how well the Dow's pharmaceutical contingent is holding up amid the overall decline, with both Merck (MRK 0.25%) and Pfizer (PFE -1.05%) putting up modest gains so far on Thursday.

One short-term factor helping Merck in its 0.5% gain today came from favorable comments and a price target boost today from a prominent analyst firm. With expectations for a more than 10% gain for Merck stock, bullish investors are looking at growth opportunities in areas like the hepatitis C market as helping to drive Merck's recovery from its patent-cliff woes of recent years.

More broadly, though, both Merck and Pfizer have demonstrated a willingness to take aggressive measures to ensure their future prospects. Pfizer, which rose 0.4% by early afternoon, is still assessing what went wrong in its failed bid to buy British counterpart AstraZeneca. Pfizer believed it would have brought large economies of scale in integrating both companies' research and development, manufacturing, and marketing bases, and it also anticipated tax savings from relocating its tax home from the U.S. to the U.K. Yet with so much for both sides to gain, haggling to figure out the fairest division of the spoils will present a huge challenge, and that's why price was such a sticking point for the merger.

Source: Steven Depolo, Flickr.

Merck's buyout of Idenix is another example of the lengths that the Dow's pharma components have been willing to go to find the right matches and to maximize their growth potential. Some have argued that Merck overpaid for Idenix, especially given the early stage drugs that the target company has in its current pipeline. Still, the better question is how well Idenix will complement Merck's existing hepatitis C business. With Merck having moved forward with phase 3 trials on some of its more promising compounds, any boost that Idenix can provide will be extremely valuable.

Finally, as the Dow Jones Industrials start to look increasingly prone to a correction, defensive investors will once again turn to safer-looking stocks as great places to ride out a downturn. Both Merck and Pfizer have impressive dividend yields that stand out even among the Dow 30, and with the never-ending need for prescription drugs for millions of patients worldwide, the pharmaceutical industry is relatively recession-proof.

Investors shouldn't expect Pfizer and Merck to be completely immune from a Dow Jones Industrials pullback. But as an aging population makes the demographics more favorable for drug companies, both of the Dow's pharma components have the opportunity for impressive growth in the future.