It’s almost as though California is a sovereign nation when it comes to Pacific Rim trade and green tech these days.

While President Trump spurned the Paris climate accords last week, Gov. Jerry Brown was busy serving as commander in chief of the United Counties of California, wrapping up a five-day tour of China that included a public session with President Xi Jinping at his side.

The governor signed a flurry of agreements to partner with China on reducing emissions and developing clean-burning technology and renounced Trump’s “reckless” approach.

“It’s a time for radical change in how we power the modern economy,” Brown declared at Beijing’s Tsinghua University on the trip’s closing day.

“This is a moment,” said Dan Kammen, a professor of energy at UC Berkeley and a science envoy for the U.S. State Department. “California is not a nation but it’s behaving as one — and that leadership mantle benefits us well here.”

Brown’s trip wasn’t just about protecting the Earth. Brown aims to protect California’s economy at the same time.

The White House has vowed to ease restrictions on business, strip away Environmental Protection Agency clout and prioritize “Pittsburgh over Paris.”

It’s about jobs, the president declared.

Longtime environmentalist Brown has not sat idle. He’s poised himself as a leader in a growing alternative alliance of nations, states and cities aiming to fight climate change, slash toxic emissions levels and develop cleaner technology.

It’s also about jobs. Green jobs.

Riding the bus

During last week’s trip, Brown’s second to China as governor, he made a special appeal to build up the state’s still burgeoning electric vehicle market.

It was economic déjà vu.

In 2013, Brown visited a car and bus manufacturer in Shenzhen called Build Your Dreams. He announced the company would be erecting an assembly line in Lancaster.

Soon, Brown promised, BYD would be selling electric buses to Long Beach.

Four years later:

• Long Beach has 10 new electric buses.

• BYD is quadrupling its factory’s size and ramping up production.

• Assembly workers just voted in a union.

• And BYD officials are inking new contracts across the country.

Macy Neshati, senior vice president for BYD Heavy Industries, expected the company to top 1,500 employees by 2018.

“It’s a huge confidence boost for us to know that we have the support of our governor, that he believes in climate change, and he is willing to spread that word and create the business opportunity in California,” Neshati said.

And he said it makes a difference in Lancaster, where city officials declare that each new manufacturing job generates a myriad of other service jobs.

Clean contacts

In recent years, California’s 79-year-old governor staked his legacy on fighting climate changes and helped propel the nation’s strongest green economy, despite insisting on the aggressive regulations and policies that some industry leaders disdain.

He’s set ambitious goals of putting more zero-emission vehicles on the road and reducing greenhouse gases to 40 percent of 1990 levels by 2030.

In the process, he’s watched California take the lead in the electric-vehicle and solar-power markets.

China, meanwhile, has become the world’s biggest investor in renewable power. While Trump promised to re-energize such traditional power as coal and oil, Chinese leaders are quietly inching away from such fuels.

China announced a $360 billion commitment this year to drive its energy-production deeper into wind and solar projects. California appeals as a promising playing field for such efforts.

“China sees California as a destination for their green products and service and also as a research center to develop their capabilities,” said Jim Wunderman, president and CEO of the Bay Area Council, who was part of a delegation of local executives, energy companies and others that joined the governor on his Asian trip.

The partnership embraces a trend already under way in California, where job growth in the clean-technology sector has far outpaced other industries.

“This a business that’s probably bigger than information technology,” Wunderman said. “That’s the economic potential of the shift from carbon to noncarbon energy.”

Behind the bond

During his Asian trip, Brown announced a California-China Clean Technology Fund and signed climate agreements with the national government.

“California is a winner in this,” said Pat Fong Kushida, president of the Cal- Asian Chamber of Commerce.

With ambitious plans to further cut vehicle emissions, Brown needs more electric cars on the road.

China — with its deep pockets, enormous consumer base and commitment to sustainable technology — may be his best way to attain that goal.

“Gov. Brown pays a lot of emphasis on environmental protection and sustainability issues. I really appreciate that,” said Sun Lushan, deputy consul general for the Chinese consulate in Los Angeles.

“Climate change, renewable energy, new energy are now becoming focal points between China and the United States,” he said. “We have to intensify our exchange and cooperation, exchange our views, experience, expertise and information and benefit from each other.”

‘A raw deal’

But not everyone is convinced.

“I hope that Gov. Brown gets as good a deal for California as China got from the Paris climate agreement,” Sen. John Barrasso of Wyoming, the chairman of the Senate Environment Committee, told the New York Times last week.

Barrasso and others, including House Speaker Paul Ryan, have argued that signing on to tough international standards imposes deep costs for U.S. industry and strips away well-paying jobs.

“The Paris climate agreement was simply a raw deal for America,” Ryan said last week. “ … It would have driven up the cost of energy, hitting middle-class and low-income Americans the hardest. In order to unleash the power of the American economy, our government must encourage production of American energy.”

For Ryan, and many of Trump’s core supporters, “energy” can be defined as legacy fuels coal and oil. Trump has promised to revive the economies of struggling U.S. states long dependent on such fuels and celebrate the jobs such a revival would generate.

Still, other Republicans, including House Majority Leader Kevin McCarthy of Bakersfield, believe the U.S. can still be a leader in cleaner-burning fuels — such as natural gas — without leaping into a worldwide accord he called “misguided.”

Kushida, with the Cal- Asian Chamber of Commerce, believes placing California in direct contact with China gives the Pacific state an advantage. But she said it hasn’t always been easy convincing her members about the financial upside of the state’s strict regulatory efforts and push for renewables.

“The opportunity is longer term, and the immediate impact to business short term is that it’s more costly,” she said. But, “sooner or later you are going to have to get there.”

The Associated Press contributed to this report.