The European Union and China reached an agreement in principle Wednesday on a long-stalled investment pact, a diplomatic victory for China and a snub to the incoming Biden administration, which had pointedly called for Europe to wait.

The agreement, which must be ratified by the European Parliament, gives European and Chinese companies better access to each other’s markets. It was pushed forward by Germany and China but is viewed with skepticism by people concerned about China’s use of forced labor, among other abuses.

Last week, as the negotiations picked up, Jake Sullivan, a senior aide to President-elect Joe Biden, urged European leaders to stall, calling for “early consultations” with the new administration. On Wednesday, Europe pressed ahead without them.

European leaders cast the agreement as a market access issue, arguing that the deal offers the E.U. something along the lines of the “Phase 1” trade deal between the United States and China and claiming to have secured a “lever” with which to press China on forced labor.

Ursula von der Leyen, president of the European Commission, tweeted Wednesday that the agreement will “uphold our interests” and “promotes our core values.”

Critics of the deal argue that Europe is knitting itself closer to an increasingly authoritarian China at a time when Beijing has shown little inclination to follow rules. Some hoped that the E.U. would team with the United States to pressure China rather than go it alone.

The back-and-forth over the pact highlights just how important — and complicated — China has become, both within the E.U. and between Europe and the United States.

Within the E.U., there is a new wariness of China but no real consensus about what to do. Biden has promised to work with allies on China, although it remains to be seen whether Europe, scorned by President Trump, is eager to work as a team.

For this reason, the fate of the agreement will be seen as an early test of Europe’s willingness to work with the incoming administration on various issues in the coming months and years.

It took a long time for the E.U. and China to get this far. Europe has long argued that Chinese companies enjoy better access to European markets than vice versa. The Comprehensive Agreement on Investment, or CAI, seeks to address that gap.

Negotiations started in 2014 but have moved slowly, stalling until summer when Germany started a six-month presidency of the E.U. and began pushing for a deal.

Trump’s electoral defeat gave China an incentive to negotiate in hopes of reaching an agreement before Biden could rally allies against this type of deal.

The agreement, if it is ratified, would theoretically loosen restrictions on European companies in China’s tightly controlled market. European companies would no longer be required to operate joint ventures with Chinese partners, for instance, or be forced to share technology, according to the European Commission’s news release.

Critics have argued that these gains mean little to European businesses if China cannot be trusted to respect the rule of law.

European leaders emphasized Wednesday that the deal will help Europe push China on human rights by getting the country to commit to making “continued and sustained efforts” to ratify International Labor Organization conventions on forced labor.

But China has a long history of ratifying human rights treaties and ignoring them. Critics question whether the E.U., having made a deal, will be in a strong position to stop that from happening again.

With the E.U. split on the pact and Washington in the cold for now, the only party that seems happy about the arrangement is China.

On Wednesday, Communist Party-controlled news outlets featured pictures of President Xi Jinping speaking via teleconference to E.U. leaders, alongside headlines celebrating the “win-win” news.

The Global Times, a party-controlled outlet known for its nationalistic tone, called the deal “a New Year gift to the world.”

Xinhua, a party-controlled news agency, conveyed Xi’s excitement, saying the Chinese leader hailed the deal as “balanced, high-standard and mutually beneficial.”

The Xinhua report made no mention of forced labor.