The United Auto Workers and General Motors Corp. said Wednesday they have reached a tentative contract agreement that ends a two-day nationwide strike immediately.

A person briefed on the contract told The Associated Press earlier that the historic agreement would shift the burden of retiree health care from GM to the union and give workers bonuses and lump-sum payments. The person requested anonymity because the contract talks are private.

The union said the deal was reached shortly after 3 a.m.

The contract must be reviewed by local UAW presidents and will then be subject to a vote of GM's 73,000 rank-and-file members. The agreement is expected to set a pattern for contracts at Ford Motor Co. and Chrysler LLC.

The deal means UAW will tell workers to head back to their jobs at around 80 GM facilities across the nation. The union went on strike at 11 a.m. Monday when talks broke down.

The agreement includes GM's top priority in the negotiations — shifting most of its $51 billion unfunded retiree health care obligation to a UAW-run trust. The company would pay about 70 percent of the obligation into the trust, called a Voluntary Employees Beneficiary Association, or VEBA.

The union would then invest the money and take over health care responsibilities for about 340,000 GM hourly retirees and spouses.

"I'm pleased to say that we have a VEBA in place that will secure the benefits of our retirees," UAW President Ron Gettelfinger said at an early morning news conference inside the union's Detroit headquarters.

Gettelfinger said he's confident of ratification and that voting likely will start as soon as this weekend.

Union leaders will be briefed on Thursday and Friday, he said.

The UAW also expects to decide Thursday what automaker it will negotiate with next.

"There's no question this was one of the most complex and difficult bargaining sessions in the history of the GM-UAW relationship," Rick Wagoner, GM chairman and chief executive, said in a statement.

The strike also affected GM plants and suppliers at locations where workers are not represented by UAW.

On Tuesday, GM idled two car assembly lines employing about 5,600 people at its plant in Oshawa, Ontario. On Monday, it idled a transmission plant in Windsor, Ontario, that employs 1,300. Workers at both plants are represented by the Canadian Auto Workers union.

Parts shortages forced GM to cancel one shift Tuesday at a Moraine, Ohio, assembly plant that makes sport utility vehicles. The plant's 2,300 workers are represented by the International Union of Electronic Workers-Communication Workers.

Delphi Corp., GM's largest supplier, said Tuesday it was temporarily laying off workers. Spokesman Lindsey Williams wouldn't give numbers because the situation was in flux. Delphi has about 25 U.S. plants that supply parts for GM.