General Motors and its main workers union have reached a tentative deal to end a strike that has halted manufacturing across the US and put thousands of people out of work for 31 days.

The auto company and the United Auto Workers reached an agreement in principle on Wednesday that, if approved, will offer much-needed financial relief to 46,000 striking workers — who have been subsisting on just $250 a week in strike pay since Sept. 15.

An agreement — which requires a vote from UAW’s national council scheduled for Thursday — will also kickstart production at GM plants that have been stalled as a result of the walkout, costing GM $1.5 billion.

The union declined to release details of the settlement agreement, but sources tell The Post that the deal doesn’t include plans to revive an Ohio plant that’s become a pet project of President Trump.

UAW and GM negotiators have reached a deal, however, to give temporary workers a path to full-time employment, as The Post exclusively reported Tuesday.

There are about 4,000 temp workers who make between $15 and $19 an hour — far less than regular full-time workers. They have no retirement benefits, a less comprehensive health care plan, and fewer paid days off, according to a person familiar with the talks.

The deal would apply retroactively to all temp workers who have already been working for more than three straight years, the person said.

In addition, GM has agreed to a pay increase during a worker’s fourth year, and keep workers’ health care contributions steady, according to the Wall Street Journal.

The agreement — which comes after negotiations were breaking apart just last week — was brokered in part by White House trade adviser Peter Navarro, who previously criticized GM over Chief Executive Mary Barra’s complaints about higher import tariffs, according to a person briefed on the negotiations.

The strike — which has affected 30 plants in the US — hasn’t ended yet, and union members could still reject the proposal, according to an announcement by the union.

“The number one priority of the national negotiation team has been to secure a strong and fair contract that our members deserve,” UAW Vice President Terry Dittes said in a statement. A GM spokesman confirmed that a proposed agreement had been reached.

News of the tentative deal sent GM’s share price up 1 percent to $36.65.

Negotiations between the UAW and GM, which centered on salaries, job security, and the future of the company, were often tense. One of the central sticking points had been over the union’s requests for GM to move the manufacturing of entire auto lines up to the US from Mexico.

UAW officials had discussed holding a “no confidence” vote in GM CEO Mary Barra as a way of having her show up to negotiations, since they were frustrated with her absence at the negotiating table during the strike, The Post reported on Oct. 2.

GM officials, for their part, grew frustrated last week that UAW officials took four days to respond to an offer to end the strike — and the auto giant took the unusual step of appealing directly to union members.

Barra has also tried to get the deal wrapped up, holding secret talks with Dittes and UAW President Gary Jones on Oct. 9, The Post exclusively reported at the time. The CEO met again with union brass on Tuesday as it appeared that a breakthrough was imminent.