NORTH CHARLESTON, S.C. (Reuters) - President Donald Trump promised to boost U.S. manufacturing and punish companies for moving jobs overseas during a visit on Friday to a South Carolina Boeing Co BA.N plant to celebrate the unveiling of its latest Dreamliner jet.

The Republican president, who previously feuded with the plane maker over projected costs for the next version of Air Force One, gave a ringing endorsement to the company on Friday and used the event to highlight his pitch to boost homegrown job growth.

“I’m going to do everything I can to unleash the power of the American spirit and to put our great people back to work,” Trump told a crowd of workers at the plant, with the presidential aircraft and the new Boeing jet behind him.

“This is our mantra: buy American, and hire American.”

Trump repeated his campaign threat that any company that lays off American workers to move to another country will face a “substantial penalty” when trying to sell their products in the United States.

Trump’s visit to the Boeing plant in North Charleston was a victory for Boeing, which had faced pointed tweets from Trump over the price tag to build a new Air Force One presidential aircraft fleet.

Trump took a tour of the factory along with Chief Executive Dennis Muilenburg, and declared that the company had done “an incredible job.”

Slideshow ( 7 images )

While Trump praised Boeing during his visit, he also signaled he would keep up pressure on defense companies to cut better deals with the U.S. government.

After delivering his remarks, Trump told reporters that the price for the Air Force One fleet is still “too high, but we’re negotiating.”

He also said that Boeing's competitor, Lockheed MartinLMT.N, would have to cut the price of its stealthy F-35 jet or his administration would consider replacing some F-35 orders with Boeing's F/A-18 Hornet jets.

“We’re going to save billions and billions of dollars,” Trump said. “Most important, we are going to have a great product from both Boeing and Lockheed.”

On Thursday, Air Force Lieutenant General Chris Bogdan, who runs the F-35 program for the Pentagon, said the cost of the jet could fall 16 percent to around $80 million in future purchases.

Trump and other U.S. officials have criticized the Pentagon’s most expensive program for delays and cost overruns, but the price per jet has steadily declined in recent years as production ramps up.

At the South Carolina plant, Boeing is building the 787-10, the largest of three models of its high-tech, carbon-fiber composite Dreamliner. Production of the other 787s is split with Boeing’s factory in Washington state.

Boeing rolled the first 787-10 out of the factory on Thursday. It is due to enter flight testing this year and reach customers in 2018.

Boeing has been pressing to get the 330-seat $306 million plane into production because it is expected to be more profitable than the smallest version. But the company has sold only 149 of the jets, a small fraction of the 1,202 Dreamliners that have been ordered.