The United Auto Workers and General Motors have agreed to a deal that will put an end to collective bargaining talks between the union and Detroit automakers following more than six weeks of targeted U.S. labor strikes, sources told CNBC.

GM is the final Detroit automaker to reach a deal with the union following historically contentious talks. Tens of thousands of workers across the country went on strikes after the sides failed to reach agreements by a Sept. 14 deadline.

Two sources familiar with the GM-UAW talks said negotiations occurred last night and into the early morning to reach an agreement. News of a deal was first reported Monday by Bloomberg.