DETROIT (Reuters) -- General Motors Co. has agreed to pay half the cost of repairing faulty fuel gauges in Chevrolet, Buick and GMC sport utility vehicles and Saab cars from model years 2005 through 2007.

The agreement, affecting up to 865,000 vehicles in the United States, closes an investigation opened earlier this year, according to documents filed with the National Highway Traffic Safety Administration. GM alerted dealers and vehicle owners in August, NHTSA said.

"With the special policy, GM is able to standardize the labor time necessary to perform the repair," GM spokesman Alan Adler said. "With the GM 50/50 special policy in place, we expect customers to save a significant amount on the cost of the fuel level sensor wear repairs."

He declined to say what GM's share of the repairs could cost the automaker but added not all of the 865,000 vehicles would be affected.

In April, federal regulators opened an investigation into 865,000 SUVs and cars for potential faulty fuel gauges that could mistakenly tell drivers their vehicles had more gas than they did.

NHTSA's preliminary investigation covered Chevrolet Trailblazers, GMC Envoys, Buick Rainiers and Saab 9-7s from model years 2005-2007 after receiving 668 complaints claiming inaccurate fuel gauge readings.

Of the complaints, 58 incidents were said to result in a vehicle stall and 43 of those were said to occur because the fuel level reading indicated more fuel than what was actually in the tank, NHTSA said at the time it opened the probe. One complaint said the affected vehicle stalled while exiting an interstate highway and was struck from behind.