Poland’s five-month-old government grabbed its first high-profile foreign-investment deal with Daimler AG’s Mercedes-Benz pledging to spend about 500 million euros ($574 million) to build an engine factory in the east European country. The factory in Jawor, in Poland’s southwest, will be Daimler’s second engine plant outside Germany as the Mercedes luxury-car brand expands to overtake rival BMW AG. The facility, with a workforce of several hundred employees in its initial phase, will make four-cylinder gasoline and diesel engines for passenger vehicles starting in 2019, Stuttgart, Germany-based Daimler said Wednesday in a statement. The deal comes as Poland’s government pursues what it calls “economic patriotism” and criticizes its predecessors for giving privileges to foreign companies which put local competitors at a disadvantage. Prime Minister Beata Szydlo’s cabinet has spooked investors by raising taxes on banks and planning to do the same on retailers, while its push to consolidate political power triggered a rating downgrade by Standard & Poor’s and an unprecedented probe by the European Union into a member state’s democratic standards. “This can clearly be seen as the government’s success amid claims its policies will hurt foreign-direct investment,” said Krzysztof Mrowczynski, an analyst at Bank Pekao SA, Poland’s second-largest lender. While details of the public aid promised by the government to Daimler haven’t been revealed, it seems “business has been separated from politics when attracting such a quality investor,” he said by phone from Warsaw. Deputy Prime Minister Mateusz Morawiecki said the deal would strengthen ties with the country’s biggest export market, Germany, and meant that Poland was “open” for business with foreign companies. Morawiecki is spearheading a multi-year government investment plan aimed at building “more Polish capital in Poland’s economy.” ‘Preferential Treatment’ “I hope this investment will be a catalyst for other projects, which will boost innovation and competitiveness of the Polish economy,” Morawiecki said in an e-mailed statement. Treasury Minister Dawid Jackiewicz said earlier on Wednesday that many foreign investors had received “preferential treatment” in Poland, including “unlimited” access to financing. Growing political risk has helped drive down Warsaw’s WIG20 stock index by 26 percent over the past 12 months, while the zloty has depreciated 8.4 percent against the euro and 5.4 percent versus the dollar, according to data compiled by Bloomberg. Poland attracted Volkswagen AG to invest about $1.11 billion in a new factory in 2014, while Jaguar Land Rover, the U.K. luxury-car unit of Tata Motors Ltd., chose Slovakia over Poland last year to build a plant with a production capacity of 300,000 cars. The Jawor plant will allow Mercedes to react more quickly to changes in demand across several production sites, Frank Deiss, head of Mercedes’s powertrain production, said in the carmaker’s statement. Shaving Costs The decision to locate the factory about 100 kilometers (62 miles) from the German border was based on a number of factors including road and rail infrastructure, availability of resources, suppliers and qualifications of the local workforce, as well as the “economic climate and support from the authorities,” Matthias Krust, a Daimler spokesman, said in an e-mailed response to questions from Bloomberg News. “We expect a stable political framework in Poland,” Krust said. “We’ve been cooperating well with political decision makers so far.” Carmakers are pushing to improve profitability by shaving costs off production processes, fine-tuning delivery of car parts and developing strategies including use of the same parts in different model lines. One area of focus is being able to switch products from one factory to another, depending on demand. Luxury-vehicle manufacturers are increasingly equipping cars with smaller, more fuel-efficient four-cylinder engines as governments mandate cleaner-running models. Mercedes is producing more cars in its bid to wrest back the global lead in luxury-auto sales from BMW’s namesake brand as early as this year. BMW outlined plans Tuesday to boost output of sport utility vehicles in the U.S. as low oil prices encourage consumers there to buy more of the large, high-riding vehicles.