Exxon Mobil and Royal Dutch Shell Plc reported strong growth in production on Thursday after years of largely falling output, helping to send second-quarter profits soaring.

But the two biggest non-government controlled oil companies in the world relied on natural gas -- traditionally less profitable than crude -- to help halt the output slide.

Texas-based Exxon said second quarter production was 4.0 million barrels of oil equivalent per day (boepd), up 8 percent on the same period a year earlier, while smaller rival Shell said output was up 5 percent at 3.1 million boepd.

After strong showings in the first quarter for both, the results raised hopes both companies could start to offer investors meaningful growth again.

The production turnaround is now well under way and should only strengthen as the big projects come on stream in the next six months, analysts at Petercam said in a research note on Shell.

Shell has suffered seven years of falling output and Exxon's performance has also been anemic over the period. Phil Weiss, oil analyst with Argus Research, noted the impressive headline output numbers were driven by gas, with Shell's crude production up only rose 1 percent and Exxon's dropping 1 percent.

Oil accounted for only 58 percent of Exxon's output, compared to 64 percent in the same period last year and Shell's oil weighting dropped to 53 percent from 59 percent.

A global gas glut due to the economic crisis and a big increase in U.S. shale gas production, means the outlook for gas prices is uncertain, which could put pressure on future earnings.

Shell Chief Financial Officer Simon Henry said the gap between gas and oil prices grew in the past year as oil prices rose faster than gas prices.

Across the sector on Thursday, companies echoed the industry leaders' experience.

Spain's Repsol, the international oil group with one of the worst production records in recent years, reported a 4.9 percent jump in output in the first half of the year compared to 2009.

Norway's largest company, Statoil, said on Thursday its production rose 2 percent to 1.77 million boepd in the quarter compared to the same period a year ago.

Exxon, Shell and Repsol reported better than expected earnings. Exxon said second quarter net income excluding one-offs rose 85 percent compared to the same period in 2009, to $7.56 billion.

Shell said second quarter profits, calculated on a similar basis, rose 34 percent to $4.21 billion.

London-based BP, which is still battling to permanently seal a blown out well in the Gulf of Mexico that has caused the U.S.'s worst oil spill, said on Tuesday its underlying result rose 77 percent.

High oil and gas prices were the main driver of the gains, although the higher output and a recovery in refinery margins also helped.

Shell's London-listed B shares traded up 1.0 percent at 1407 GMT against a 0.5 percent rise in the STOXX Europe 600 Oil and Gas index. Exxon shares rose 0.9 percent to $61.47.

U.S. crude prices were 30 percent higher in the quarter than a year before, averaging $77.81 a barrel, while global refining margins rose 10 percent, according to BP data.

Shell's results included a $56 million charge related to the U.S. moratorium on deepwater drilling, imposed after the BP oil spill three months ago.

Chief Executive Peter Voser told analysts on a conference call he would think about reclaiming the money from BP.

BP declined to comment on the potential for a Shell claim but pointed out the compensation they agreed to fund did not cover such items.

Shell added it had exceeded restructuring targets, achieving annual cost savings of $3.5 billion and cutting 7,000 jobs, allowing it to wrap up its overhaul six months quicker than planned.

(Editing by Andrew Callus)