President Obama’s performance in pushing for approval of fast track legislation of the Trans Pacific Partnership trade deal, in which he’s allied with Republicans and has spent the last week castigating and insulting liberal Democrats, has been one of the most bizarre and ill-advised performances of his presidency.

I spent many years working for senior Democratic Senators such as Lloyd Bentsen and House Democratic leaders beginning with the legendary Speaker Tip O’Neill, and have never seen any president of either party insult so many members of his own party’s base and members of the House and Senate as Mr. Obama has in his weeks of tirades against liberals on trade.

In Mr. Obama’s speech at Nike last week, his comments to Matt Bai of Yahoo over the weekend, and White House press secretary Josh Earnest’s comments to reporters on Monday, Mr. Obama and his White House staff have repeated a string of personal insults directed against prominent liberal Democrats in Congress, liberal Democrats across the nation, organized labor, and leading public interest and environmental groups who share doubts about the TPP trade deal.

By the time the House and Senate finish their work on trade the headline will probably be either “Obama loses on trade” or “Obama and Republicans win on trade.” Either outcome is undesirable for Obama.

Mr. Obama’s tirades on trade have included accusations that these liberal Democrats are ignorant about trade policy, insincere when offering their opinions, motivated by politics and not the national interest, and backward looking towards the past. Obama’s repeated attacks against Sen. Elizabeth Warren (D-Mass.), in which he charged that Warren’s concern about the trade bill is motivated not by a reasoned view of what is right for America but by her personal political motivations, is one of the most dishonest and repellant examples of character assassination and contempt by any American president, against any leading member of his own party, in my lifetime.

Of course Ms. Warren, the most nationally respected liberal leader in American politics, is motivated by what she believes is right for the nation. Doubts about the trade bill are not limited to Ms. Warren. They are shared by the leader of Senate Democrats, Sen. Harry Reid (D-Nev.), the leader of House Democrats, Rep. Nancy Pelosi (D-Calif.), and a majority of Democrats in the Senate and House as well as a significant number of leading liberal economists.

For the President to suggest that he knows more about trade than all of them do, and that they are all ignorant about the trade bill and trade policy, is staggeringly false and contemptuous of many who have been working on trade policy far longer than he has and know far more about trade, in truth, than he does.

For Obama to question liberals’ knowledge of trade, when he has chosen to keep the terms of the trade talks secret from the American people and most leading trade experts, and classified them as though the terms of trade talks should be equated with nuclear weapons secrecy, is absurd. As Elizabeth Warren and many others charge that the game is fixed, does anybody seriously believe that the highest paid lobbyists for the most wealthy global conglomerates that will reap the greatest profits from the trade pact are not aware of the key details of the trade talks that are being kept secret from most of the nation?

Let’s be clear. The issue is not protectionism versus free trade. Globalization is here to stay; it cannot be wished away. The issues are what should be the fair terms of trade; whether these terms should be decided in secrecy, where the winners get special access to the terms of the deal where the losers and the nation as a whole are kept in the dark; and whether Obama can lead an informed national discussion based on shared knowledge and mutual respect that his tirades about trade have failed to offer.

Obama should be nervous. By the time the House and Senate finish their work on trade the headline will probably be either “Obama loses on trade” or “Obama and Republicans win on trade.” Either outcome is undesirable for Obama.

Obama’s inexplicable mistake is that rather than try to persuade liberal Democrats to support the trade bill, and rather than push Republicans to accept amendments that would tie a major jobs bill to the trade bill to mitigate the economic damage that liberals correctly worry about, Obama joins Republicans in castigating liberal Democrats.

To make matters worse, Obama’s insults against liberal Democrats on trade materially harm the presidential candidacy of Hillary Clinton, who needs to solidify trust from the liberals who distrust the trade bill. Does Clinton want to side with Obama and against the overwhelming majority of Democratic liberals on trade, on an issue where Obama’s attacks against liberals have inflamed many of them? Or does she want to side with the liberals, which could lead to defeat of the trade bill and alienate many of her business supporters?

Obama to this day does not fully understand why Republicans walloped him in the 2010 midterm elections, taking control of the House, and walloped him again in the 2014 midterms, taking control of the Senate, leaving his presidency a prisoner of a Congress that is fully controlled by Republicans.

What happened in 2010 and 2014 is that Obama inflamed conservative and Republican voters to vote in large numbers, while he depressed many liberal and Democratic voters who stayed home on Election Day. Obama’s current contempt for liberals on trade reinforces a trend that leads to the worst election results for Democrats.

For Obama to fire insults against liberals at Nike last Friday only adds insult to insult to injury. Nike is one of the companies most associated with exporting American jobs abroad to low-wage nations that often have abusive practices against workers. Is the president who says liberals don’t know what they are talking about on trade intellectually unaware of this, or callously insensitive to this, or so contemptuous of liberals he simply does not care?

Obama should be listening to liberals and working with liberals, not insulting liberals who want more high paying jobs under better conditions for American workers and workers around the world.

At this late date there is still a solution that can help Obama escape from the box he has created for himself, and help America avoid the worst aspects of globalization that could further hurt America.

The president should declassify and make public the terms of the trade talks to convince the nation there is no hidden danger lurking in the secret trade deal, to allow the leading economists and policy advisors of the nation to fully debate and clearly propose the best jobs plans to mitigate any damage.

In particular, President Obama should lead the charge to include in a trade bill the long-discussed and never enacted plan (which many business leaders and Republicans support) to create massive numbers of high wage jobs to rebuild America’s roads, ports, bridges, and schools.

No nation can avoid the economic facts that cause and will continue globalization. And no nation can avoid the economic fact that unfair terms of trade become a job destruction machine migrating jobs from higher wage nations to lower wage nations, creating downward pressure for wages in all nations, while computers and robots replace men and women doing the work of the world.

On trade Obama should be listening to liberals and working with liberals, not insulting liberals who want more high paying jobs under better conditions for American workers and workers around the world.

READ: Why The Jeffrey Epstein Affair Imperils Hillary Clinton’s Presidential Prospects

Correction: An earlier version of this story misspelled White House press secretary Josh Earnest’s surname. The Observer regrets the error.

Brent Budowsky formerly served as policy aide to Sen. Lloyd Bentsen (D-Tex) and Legislative Director to Rep. Bill Alexander D-Ark.), then Chief Deputy Majority Whip. He holds a law degree from Catholic University, and an LL.M. degree from the London School of Economics and writes a weekly column for The Hill.