From its inception, America has welcomed the best and brightest to its shores, and we have the world’s largest economy to show for it. Similarly, foreign direct investment has been an essential driver of our economic growth. Unfortunately, America is losing its competitive advantage in attracting global investment and the well-paying jobs it provides.

Maine, which ranks ninth in the nation in the number of workers per capita employed by foreign companies, is in a global race for jobs. At a time when most lawmakers are doing all they can to encourage job creation, however, the Maine Legislature has passed a “tax haven” bill that will ultimately discourage foreign investment in the Pine Tree State.

Insourcing companies, foreign companies that operate in the United States, are bringing investment and jobs to our country from abroad. In Maine alone, insourcing companies employ 30,500 people — more than 6 percent of the state’s private-sector workforce.

To ensure insourcing companies have the best opportunity to grow business and workforce in the United States, policymakers must recognize how the global economy works. The “tax haven” legislation may seem like it is going after abusive tax practices, but in reality, it misses the mark completely in understanding the 21st-century complexities of how global businesses operate. This could spell bad news for Maine’s efforts to retain and attract insourcing companies, which would have a negative impact on the state’s economy overall.

In fact, the Organization for International Investment recently released an economic report providing a first-ever analysis of the role insourcing companies have played in the U.S. economy over the past decade. The findings were striking. Insourcing companies, as a group, outperformed the economy-wide average in nearly every relevant economic indicator, including increasing their contribution to U.S. gross domestic product by 25.2 percent, nearly double the private sector’s 14.3 percent increase. The report also showed that these companies’ charitable giving has grown by 44 percent over the past decade, compared to an economy-wide contraction of nearly 5 percent.

Insourcing companies raise their industries’ economic performance, invest heavily in research and development, buy materials locally, establish innovative workforce training programs, and increase compensation and benefits for Americans by paying them a 22 percent premium above the U.S. private-sector average. In short, when insourcing companies invest in America, families prosper and communities thrive.

At the state level, Maine ranks 45th in the nation in corporate tax rate competitiveness, according to the Tax Foundation. Instead of working to modernize the tax code, lawmakers in Augusta recently passed legislation that would blacklist certain countries by deeming them ”tax havens” and arbitrarily penalize employers in the state who have operations in these jurisdictions. The flawed premise behind “tax haven” legislation is that if a global company has operations in any number of jurisdictions, it must be doing so to avoid paying taxes. This legislation completely overlooks legitimate business decisions such as reaching new customers or streamlining supply chains.

The bill’s premise is a false assumption that misrepresents the value global companies provide, and it conflicts with the longstanding agreements that America has negotiated with other countries to ensure global companies pay the taxes owed in an equitable manner.

Take Luxembourg as an example: America has had a tax treaty in force with Luxembourg for more than a decade. Even though Maine’s population is 2.5 times larger than this European country, Luxembourg has invested more than $202 billion in the United States. In fact, last year alone, its investment in the United States outpaced those from Germany, France, China, and Mexico, to name a few.

Simply put, states that do not respect the obligations of our nation’s tax treaties and protocols risk losing the investments that directly support 5.6 million jobs in America. States that align with these international norms position themselves to capture global investment and jobs in the future. Gov. Paul LePage should veto the “tax haven” legislation that will only make Maine less competitive in the global race for job creation.

Nancy McLernon is the president and CEO of the Organization for International Investment, which represents the U.S. operations of many of the world’s leading global companies that insource millions of American jobs.