General Motors Co. and the United Auto Workers union were near a deal on Tuesday to end a 30-day strike that has cost the automaker about $2 billion after Chief Executive Mary Barra and President Mark Reuss took part in contract talks, according to two people briefed on the matter.

While a final agreement has not been announced, the No. 1 U.S. automaker and the union have agreed to terms on most issues but were finalizing the wording on some matters, said the people, who asked not to be identified as the talks were ongoing. A deal will likely be announced on Wednesday.

GM declined comment on the involvement of its top two executives in the negotiations. A UAW spokesman declined comment.