LONDON -- Ace investor Neil Woodford clearly knew what he was doing when he invested in GlaxoSmithKline (LSE: GSK.L), as the shares have stormed up close to a five-year record high this week.

The shares closed at 1,499 pence last night, which is only beaten by the 1,506 pence they achieved way back on Oct. 25, 2006. They've dropped back a little today, to 1,478 pence, and did fall along with the markets during the recent crisis.

But it's still a great performance for a FTSE 100 (INDEX: ^FTSE) share to have risen from a 2009 low point of 1,000 pence to today's price in just three years -- especially in a sector that is starting to see stiff competition from generic drugs.

Neil Woodford does seem to like pharmaceuticals, having also bought into AstraZeneca (LSE: AZN.L) and Switzerland's Roche. If you want to get an overview of where the great man has the rest of his money, Motley Fool analysts have compiled their "8 Shares Held by Britain's Super Investor" report, which you can get free for a limited time.

GlaxoSmithKline
But today, I'm just going to look at GlaxoSmithKline. What is it doing that's so right? Well, for starters, take a look at how it has been rewarding its shareholders over the past five years, together with estimates for the next two years...

Year to December

Earnings per Share (pence)

Dividend per Share (pence)

Dividend Increase

Yield

2007

99.1

53

-

4.2%

2008

104.7

57

7.5%

4.5%

2009

121.2

61

7%

4.6%

2010

53.9

65

6.6%

5.1%

2011

114.1

70

7.7%

4.7%

2012 (est.)

121.7

74

5.7%

5.0%

2013 (est.)

131.7

79

6.8%

5.4%

Historic yields are based on the end-of-year price, forecast yields on the current price.

Apart from a dip in 2010, a year that saw significant restructuring at the pharmaceuticals giant, we're seeing steady earnings with a general upward trend. But we also see a strong dividend, coming in at a steady 4.5% to 5% per year, which is a pretty decent return on its own even without any share price rises. And more important, there's a firm focus on increasing that dividend every year -- which the company always stresses in its annual reports.

How has it managed it?
Major threats to the world's big pharmaceuticals companies are coming from two main directions. First is the expiry of patents on current drugs and the general decline of the traditional "blockbuster" drug model, and the second is increasing competition from generic drugs, often made in developing countries like China.

But the industry, and GlaxoSmithKline, is changing, and is moving more toward biotechnology in its search for medical advances, with much cleverer diagnostics, gene therapy and a whole host of new approaches helping keep the leaders ahead of the lower technology competition.

Going for growth
This year alone, GlaxoSmithKline has been increasing its share of ownership of U.S. biopharmaceuticals company Theravance, which develops "small molecule medicines across a number of therapeutic areas including respiratory disease, bacterial infections, and central nervous system." It currently owns 26.7% of it.

And it has also fully acquired Cellzome and its proteomics technologies, has a tender offer open for the entire share capital of Human Genome Sciences (Nasdaq: HGSI), and has forged a joint venture with Daiichi Sankyo to create Japan's biggest vaccines company.

The competition
In this, GlaxoSmithKline is ahead of fellow FTSE 100 constituent AstraZeneca, whose acquisition strategy has largely been seen as a bit of a flop -- although AstraZeneca has recently teamed up with Bristol-Myers Squibb (NYSE: BMY) in the U.S. to launch a buyout of Amylin Pharmaceuticals.

AstraZeneca's share price has done less well over the past few years, but has been gaining ground in recent months. Perking up from a year low of 2,591 pence just a month ago to 2,920 pence today, it has put on 13%. And it has a tasty 6.4% dividend forecast for December 2012.

I reckon the pharmaceuticals sector in general is a good one to be in at the moment, with GlaxoSmithKline my favorite, which is why I chose it for The Motley Fool Beginners' Portfolio. But if you don't fancy it, I'd recommend you have a look at the free report "Top Sectors of 2012," which examines other sectors that are looking like bargains right now.

Are you looking to profit as a long-term investor? "10 Steps to Making a Million in the Market" is the latest Motley Fool guide to help Britain invest. Better. We urge you to read the report today -- while it's still free and available.

Further Motley Fool investment opportunities: