France's Total posted lower quarterly earnings on Friday as higher crude prices failed to make up for unfavorable exchange rates, production losses in the North Sea and Libya, and a weak refining business.

Total said second-quarter net income, excluding one-offs and unrealized gains or losses related to changes in the value of fuel inventories, was 2.79 billion euros ($4.01 billion), below the 2.85 billion average forecast in a Reuters analysts poll.

In dollar terms, Total's underlying result was up 7 percent, far below the performance of rivals Royal Dutch Shell and Exxon Mobil , which saw their profits rise 77 percent and 41 percent respectively.

Total's weaker performance was mainly due to a 2 percent drop in oil and gas production to 2.31 million barrels of oil equivalent per day due to maintenance downtime in North Sea fields and production disruptions in conflict-torn Libya.

This prevented Total from taking the full benefit of strong rises in oil prices, which were on average at $101.07 in the second quarter, up 27 percent year on year.

Yet Total, which has spent billions of euros in recent months to build up its presence in energy-rich countries such as Russia, Canada, Brazil or Australia, kept an upbeat view on coming quarters.

With a strong balance sheet and a dynamic pace of execution in all of the group's segments, Total begins the second half of 2011 very confident in its outlook for profitable growth to benefit shareholders, Chairman Christophe de Margerie said.

Total also said it would pay a quarterly dividend of 0.57 euro per share, implying an annual payout of 2.28 euros per share that would be unchanged from last year's.

(Reporting by Marie Maitre; editing by Sophie Walker)