LONDON -- After rocketing 30% from its 52-week low, the FTSE 100 index has broken through the 6,800 mark and reached the highest level seen since 2000. The U.K.'s leading index is now within just 150 points of its all-time high of 6,930, reached at the height of the dot-com bubble.

Not all companies have joined in the great rally. As a contrarian investor, I'm always interested in stocks that are out of favor with the market. Unloved shares have the potential to be some of the best long-term investments.

Imperial Tobacco Group (IMB -0.06%) (IMBB.Y -0.22%), security firm G4S (GFS), and temporary-power supplier Aggreko (AGK) have all sunk while the market has soared.

Imperial Tobacco
At a current price of 2,389 pence, Imperial Tobacco is down 9% from its 52-week high. The U.K.'s second-largest tobacco group is now trading on a forecast price-to-earnings ratio of 11.3 for the year to September 2013 and offers a prospective dividend yield of 4.9%. Rival British American Tobacco is on a P/E of more than 16, with a yield of 4%.

Analysts forecast Imperial Tobacco's earnings will grow at an average of about 5% a year for this year and next, but they reckon British American Tobacco's growth will be nearer 10% a year.

Whatever British American Tobacco's prospects, Imperial's 4.9% yield and the potential for a rerating of the shares down the line make the stock an interesting long-term prospect for growth and income.

G4S
At a current price of 250 pence, G4S is down 20% from its 52-week high. A staffing fiasco at last year's Olympic Games hit the shares hard, and chief executive Nick Buckles has just stepped down after a series of embarrassments over the last few years.

The world's largest security firm is now trading on a forecast P/E of 11.4 for the year to December 2013, with a prospective dividend yield of 3.8%. Analysts are forecasting earnings growth of 4% for the current year, but they're expecting growth to accelerate to 10% by 2014.

Reputational damage doesn't last forever. Given that demand for security services around the world isn't likely to vanish anytime soon and that G4S generates almost a third of its revenue from high-growth developing markets, the longer-term prospects of this lately beleaguered company look rather promising.

Aggreko
At a current price of 1,858 pence, Aggreko is down 23% from its 52-week high. The global leader in the rental of temporary and emergency power-generation equipment issued two profit warnings in as many months at the back-end of 2012. The first warning was blamed on adverse currency movements and an increased provision for bad debts, the second on several factors, including the winding down of U.S. military operations in Afghanistan.

In these circumstances, you may be surprised to learn that Aggreko's shares are trading on a lofty forecast P/E of 19 for the year ending December 2013, particularly as earnings are forecast to fall 7%, with growth only resuming at 7% for 2014. During the period between 2008 and 2012, Aggreko's average annual earnings growth was 28%.

A P/E of 19 can certainly be justified when earnings growth is running at 28%, but does the company merit a premium rating when analysts are forecasting no earnings headway until at least 2015? On the positive side, the long-term structural drivers of growth for Aggreko's business certainly remain intact.

Investing for the long term is the Foolish way to build your wealth. If you're in the market for quality companies that should stand the test of time, you may wish to read this brand-new Motley Fool report. You see, the Fool's top analysts have pinpointed a select handful of blue chips as "5 Shares To Retire On." These five high-quality businesses include a utility group "with nearly guaranteed returns," a health care company with "prodigious cash generation," and a retailer trading at "an appealing discount."

You can download this free report right now with no further obligation -- simply click here.