BRUSSELS (Reuters) - If Donald Trump's ditching of a U.S.-led trade alliance with Pacific Rim nations wasn't a gift to the European Union, then it must be the next best thing.

The president's decision on his first day in office effectively pulled the United States out of the race to frame global trade rules. With Washington preoccupied by an attempt to renegotiate its existing NAFTA treaty with Canada and Mexico, the EU has an opportunity to become the top setter of common business standards in a series of new deals.

Still the world's biggest trading bloc, the EU is recovering its self-confidence after a long economic crisis and Britain's vote to leave the union. Now it has much of Asia and Latin America in its sights for trade treaties, while a far-reaching pact with Canada will already enter force in September.

Japan turned to the Brussels this month to seal a deal on creating the world's biggest open economic area, after being dumped by Trump's scrapping of the 12-nation Trans-Pacific Partnership (TPP) free-trade accord in January.

EU trade chief Cecilia Malmstrom - who until Trump's election had been struggling to persuade Tokyo to agree tough trade-offs - acknowledges the change of fortunes.

"I do not regard President Trump as a gift maybe, but it is true that many countries have started to look around more broadly," she told Reuters. "Other countries feel that they need to look out for new friends and other allies, so yes, it has increased interest in cooperation with Europe and with others."

Import tariffs are already low between developed economies, so negotiations now focus more on agreeing common standards. The aim is to make it easier and cheaper for firms to do business in differing markets, avoiding the need to tailor-make products to meet varying local rules, be they for cars or cheese.

For a graphic on EU trade deals, click http://tmsnrt.rs/2q71iyk

While China is seeking greater influence, the battle has largely been between U.S. and EU standards as a template for deals governing how goods and services are bought and sold.

Beijing may yet rival Europe provided it embraces a rules-based global trade order in the years to come, economists say.

But in the meantime, the EU is pushing to conclude deals this year not only with Japan, but also Mexico and the Mercosur group led by Brazil and Argentina, while pressing ahead with Australia, New Zealand and Asian countries including Malaysia - also left high and dry by the TPP collapse - and Indonesia.

Europe is still struggling with low economic growth and high unemployment, and the EU's share of global trade in goods and services has fallen to 16.8 percent in 2016 from 18.8 percent a decade earlier, according to EU data.

Unless the EU can reverse the trend, it risks losing its top spot when Britain - the world's fifth biggest economy - departs in 2019. The U.S. share of global trade was 15.0 percent last year and China's was 13.4 percent.

So Brussels is pinning its hopes on a boost from new treaties, even though these take time to negotiate and win legislative approval - especially in a bloc which will still have at least 27 member states after Brexit.

If all goes well, the EU's existing and planned pacts will link markets of more than two billion people producing nearly half of global economic output. This excludes stalled negotiations with the United States and India.

The United States' existing trade treaties encompass a third of world output and fewer than 700 million people, with no new deals near completion - although Trump says he wants to clinch one with Britain when it leaves the EU.

REMARKABLE DEAL

In trade talks, the biggest economies largely get their way in setting common standards, so a string of new agreements could make EU rules the benchmark for everything from selling farm products to running tenders for public works contracts.

That would benefit EU firms, which already comply with the bloc's rules, while those from other countries would have to adjust to new sets of regulations.

Even Japan has agreed to align its standards for cars and parts produced by its motor industry with those used by the EU.

Brussels has also secured better access for its companies to public tenders in Japan right down to a local level, such as for railway equipment, hospitals or electricity distribution. That means, for instance, a French or Spanish firm could sell high-speed "bullet trains" to the country that pioneered the idea.

While Japan is the world's number three economy, its share of global trade is 4.9 percent, less than a third of the EU's.

The deal also gives the EU the upper hand in its promotion of "geographical indications" to guarantee, for example, what is labeled as feta cheese comes only from Greece and as champagne only from France. This contrasts to the U.S. approach where producers anywhere can seek a trademark for what they sell.

It still needs to be formally signed and ratified but the EU has scored a notable success, according to Hosuk Lee-Makiyama, director of the Brussels-based think-tank ECIPE. "If you consider the concessions the Japanese have made on cars and on public procurement, it's quite remarkable," he said.

U.S. "OWN GOAL"

Trump said this month that the United States had made "some of worst trade deals in world history", arguing they have been bad for American workers. Still, the Pacific Rim TPP deal would have bound the 12 signatory nations to rules set along U.S. lines, most likely favoring American businesses.

Pulling out of the TPP was "the biggest own goal of the new U.S. administration", Lee-Makiyama said. "The United States was the station manager of the international trading system and it has abdicated in a rather flamboyant way."

A bilateral U.S.-Japan free trade deal was now off the table too because Tokyo could not offer agricultural concessions to Washington after yielding to EU farming demands, he added.

Even Britain will probably have to agree to rules forged by negotiators in Brussels when it strikes bilateral deals after Brexit, as the EU's main trade partners adopt the bloc's norms. These will include systems to govern legal disputes among investors and food safety rules.

CHINESE CHALLENGE?

Washington could still change tack and embrace open markets. Commerce Secretary Wilbur Ross said in May it made sense to revive stalled free-trade talks with the EU, albeit towards a deal cutting the U.S. trade deficit with Europe.

Senior diplomats from some EU allies including New Zealand and Canada have expressed frustration at the slow bureaucracy in the EU, whose accords have be translated into 24 languages and ratified by more than 30 national and regional parliaments.

Europe's opportunity could also be squandered if it allows internal squabbling between free trading and more protectionist member states to undermine its credibility.

But with Trump focused on renegotiating the North American Free Trade Agreement with Canada and Mexico, "the United States is out of the picture for the next three and a half years", said Jeffrey Bergstrand at the University of Notre Dame in Indiana.

China, which overtook Germany as the world's biggest exporter in 2009, also has ambitions to dominate global trade, and wants to break Europe's hold on the container shipping industry and deepen its ownership of international ports.

President Xi Jinping also seeks to link Asia, Africa and Europe with billions of dollars of infrastructure investment to extend Beijing's reach under his "Belt and Road Initiative".

But Western officials, investors and economists say China's opaque governance, regular changes to legislation and curbs on foreign investment limit its ability to emerge as a champion of the rules-based order underpinning trade deals.

Capital controls imposed since November make it harder for individuals and companies to move money out of China.

"Until, or unless, China transitions to a rules-based liberal political and economic regime, I have serious doubts that they can lead the world," said Erik Nielsen, chief economist at UniCredit Bank.

(Additional reporting by Alastair Macdonald in Brussels, Leslie Wroughton in Washington; editing by David Stamp)