The union representing Boeing workers has agreed to a tentative deal that would effectively end the politically charged dispute between the giant airline manufacturer and the National Labor Relations Board.

The agreement, reached Wednesday, would extend the union’s labor contract by four years. The deal offers wage and pension increases to workers, while guaranteeing a period of labor peace long sought by Boeing.

The deal also includes a Boeing commitment to assemble the new 737 MAX in a union shop in Renton, Wash., guaranteeing the kind of job security sought by the union.

If members ratify the agreement Dec. 7, the union said it would ask the NLRB to drop a federal complaint over the company’s decision to open a nonunion assembly plant in South Carolina.

“It would resolve the issue,” said Connie Kelliher, a spokeswoman for the International Association of Machinists and Aerospace Workers District Lodge 751.

Settlement of the South Carolina complaint would relieve a major political headache for the Obama administration.

Although the NLRB is an independent agency that is supposed to operate free of White House influence, the complaint has been invoked by many Republicans and their allies as symbolic of what they call the Obama administration’s overreaching regulatory approach.

Since taking office, Obama has reshaped the NLRB, which enforces labor law, moving it to a a more pro-union stance after it sided with employers for years under President George W. Bush.

Critics said the NLRB action against Boeing could cost thousands of good jobs in South Carolina, a state suffering with one of the nation’s highest unemployment rates. Republicans, in particular, pointed to it as a prime example of how federal government regulations can kill jobs.

The NLRB’s role amid a struggling economy stood to be a critical issue in the national political debate. But if the Boeing case is settled, it would substantially diminish the impact of that issue just before the 2012 presidential campaign hits full stride.

“The tentative agreement between Boeing and the Machinists Union is a very significant and hopeful development,” Lafe Solomon, NLRB’s acting general counsel, said in a statement. “If ratified by employees next week, we will be in discussions with the parties about the next steps in the process.”

The agreement would leave a production line for Boeing’s 787 Dreamliner in place at a recently opened $750 million plant in South Carolina, a right-to-work state.

Solomon filed the case earlier this year alleging that Boeing violated labor laws by opening the production line in South Carolina, rather than Washington state. Responding to a complaint from the union, the NLRB alleged that Boeing was punishing unionized workers in Washington state for past strikes at the company’s West Coast operations.

Boeing did not deny that concern about strikes played a part in the decision. But the company said that other reasons for opening the South Carolina plant were decisive. They included lower labor costs, lower taxes and government incentives in South Carolina.

All along, Solomon said he wanted to settle the case and had no intention of seeing the South Carolina plant shut. But he said he saw no option other than to file the complaint.

In a statement, Boeing said the agreement “reflects a new era of working together between the company and its IAM-represented employees.”