UAW members employed at General Motors Co. (GM) - Get Report ratified a collective bargaining agreement with the automaker Friday, ending a 40-day strike, the union said in a statement.

Shares of GM rose 29 cents, or 0.8% to $37.03 in after-hours trading Friday after gaining 2.6% in the regular session.

The stock has fallen about 5% since the strike began on Sept. 16. Published reports have estimated GM's losses during the strike at as much as $2 billion. 

The pact includes an $11,000 signing bonus, two 3% annual raises, two 4% lump sum payments and no change in healthcare costs, the union said. The union will target Ford Motor Co.  (F) - Get Report in the next round of pattern bargaining, according to a separate statement.

Ford shares fell 1 cent, or 0.1%, to $8.71 in after-hours trading.

GM's quarterly report is scheduled for Tuesday, Oct. 29. Read what Jim Cramer has to say.

Save 57% during our Halloween Sale. Don't let this market haunt you. Join Cramer's Investment Club, Action Alerts PLUS. Click here to sign up!