Ford managed to eke out stronger earnings that sent its shares higher on Thursday, while GM shares fell 5 percent even though both automakers had good quarters in North America and poor results in South America.

Still, the picture remains cloudy for both automakers in the second half, which for Ford will carry heavy costs because of new vehicles. The tough outlook was echoed by South Korea's Hyundai Motor Co, which also reported second-quarter results on Thursday.

"GM came in a little bit below market estimates and Ford did better," said Mirko Mikelic, senior portfolio manager with Clear Arc Capital, which currently does not own either stock. "GM also has some headwinds with all the recalls. That obviously doesn't help them."

GM executives said the No. 1 U.S. automaker's underlying business is performing on or ahead of a plan outlined in January, when they said full-year operating profit would rise modestly from $8.6 billion last year. However, its results were overshadowed by the continued noise surrounding the costs associated with recalls, including one for a defective ignition switch linked to at least 13 deaths.

The Detroit company's second-quarter profit fell short of expectations, but Chief Financial Officer Chuck Stevens touted strong results in the two largest auto markets - China and the United States. He reiterated GM's financial targets, including returning to profitability in Europe by mid-decade, and said overall results would be slightly stronger in the second half.

Meanwhile, Ford's profit was driven by record results in North America and it reaffirmed its forecast for a full-year profit of $7 billion to $8 billion.

The No. 2 U.S. automaker also repeated its warning that second-half results will reflect heavy costs related to a record number of vehicle launches, including the critical F-150 full-size pickup truck, a high-margin vehicle that is being extensively redesigned.

Hyundai also warned of a tough second half as it grapples with the strong local currency. Its second-quarter profit of $2.18 billion was down nearly 7 percent, hurt by the strong won as well as U.S. discounts that hit highs not seen in more than four years.

GM's net income fell to $190 million from $1.2 billion a year earlier, with its adjusted earnings per share of 58 cents missing analysts' forecast by a penny.

Including the charges and costs in the second quarter, GM's recalls have accounted for about $3.8 billion in total costs so far this year.

One-time items in the second quarter for GM included a charge for establishing a victims' compensation fund of at least $400 million for those killed or injured by the faulty ignition switch. Since GM has said there is no cap on that fund, which administrator Kenneth Feinberg will independently control, it said that figure could rise another $200 million.

GM also changed the way it is accounting for recalls going forward, resulting in another charge of $874 million. That figure is part of the $3.8 billion total.

The quarter also included a previously disclosed $1.2 billion in recall-related costs, following a $1.3 billion writedown in the first quarter. GM has recalled almost 29 million vehicles this year.

GM's revenue rose slightly to $39.6 billion, short of the $40.59 billion analysts had expected. Retail sales rose 5.7 percent in both North America and its International Operations unit that includes China, but slid 11 percent in Europe and 18 percent in South America.

GM's loss in Europe was wider than expected by Wall Street.

Ford, on the other hand, surprised analysts by posting its first European profit in three years, leaving the company well on track to achieving its objective for full-year profit in that region in 2015.

However, Ford, like GM, lost money in South America. While GM sees things getting better in that region in the second half, Ford downgraded its outlook there, saying it now expects a greater full-year loss than it had projected previously and that the second half of the year would result in break-even results or a loss.

Ford's overall second-quarter profit rose to $1.3 billion, from $1.23 billion. Excluding one-time items, the company's 40-cent per-share profit topped analysts' expectations by 4 cents.

Ford's operating margins in its home market improved to 11.6 percent but the company reaffirmed that would decline in the second half and finish between 8 percent and 9 percent for the full year. GM's second-quarter margins in North America hit 9.2 percent and officials said they remain on track to hit their mid-decade target of 10 percent.

Ford's revenue of $37.4 billion topped analysts' expectations for $36.16 billion.

GM shares were down 5 percent at $35.55 and Ford shares were up 0.4 percent at $17.85 shortly before the close of trading on Thursday.

(Editing by Matthew Lewis)

By Ben Klayman