When the European Union passed a 2022 law to loosen Apple’s grip on the app economy, Epic Games, the maker of Fortnite, began planning to launch a competing app store for developers.

But before that law could go into effect this week, Apple has blocked Epic’s European subsidiary from using iPhone software tools, making it impossible for the game developer to create the Epic Games Store.

In correspondence from Apple to Epic Games, the tech giant said that Epic had shown in the past that it was unwilling to follow Apple’s rules to protect the App Store and that it couldn’t return to the Developer Program that supports it. Apple also objected to Epic’s criticism of Apple’s plans to comply with Europe’s tech competition law.

Apple’s move is the latest salvo in a long-running battle with Epic. In 2020, Epic broke the App Store’s rules by encouraging customers to pay it directly for features in Fortnite. Apple threw Epic out of the App Store, and Epic sued Apple for violating antitrust laws by requiring developers to use its payment system.

With its rejection of Epic’s access to developer tools in Europe, Apple is testing the boundaries of Europe’s tech competition law. The Digital Markets Act, which takes effect Thursday, requires Apple to give app makers alternatives for selling software to iPhone and iPad users, including the ability to use alternative payment systems and competing app stores.

An Apple spokesman said in a statement that “Apple has the right to terminate” any of Epic’s games and that it did so because of Epic’s “egregious breach of its contractual obligations.”

Tim Sweeney, the chief executive of Epic, said his company had invested billions of dollars to create the Epic Games Store and would file a complaint to European regulators over Apple’s action.

“We see Apple’s decision to block us from competing as a blatant effort to kneecap its leading competitor,” Mr. Sweeney said, adding, “This isn’t just about Epic versus Apple. The D.M.A. is about ensuring consumers the benefit of competition, of better prices.”

In 2018, Epic Games launched a digital store to distribute games on PCs and other devices. The store currently takes a 12 percent commission for every game it sells, which is less than the 30 percent Apple typically collects.

Epic is the among the first app makers to complain that Apple is blocking competing app stores. But other developers have criticized Apple’s plans to comply with the Digital Markets Act and called on European Union regulators to investigate the tech giant.

Should the European Commission, the European Union’s executive arm, open a formal investigation into complaints from Epic or other developers, it could set up a lengthy legal battle that might force Apple to change or risk fines of up to 10 percent of its global annual revenue, which was nearly $400 billion last year.

An investigation would deepen the challenges confronting Apple over its App Store policies. On Monday, the European Union regulators fined Apple 1.8 billion euros ($1.95 billion) for thwarting competition among streaming music rivals. Last year, South Korea’s telecommunications regulator said it might fine Apple $15.4 million for “unfair practices.”

Apple’s dispute with Epic’s plans to create a competing app store in Europe began last month. Epic wrote Apple saying it planned to use its subsidiary in Sweden to bring the Epic Games Store and Fortnite to iPhones and iPads in Europe. Initially, Apple granted the subsidiary, Epic Games Sweden AB, a developer account, but it later terminated the account.

In an email to Mr. Sweeney, which Epic Games posted on its website, Phil Schiller, who leads the App Store, questioned Epic’s willingness to follow Apple’s rules. He said that Epic deliberately broke Apple’s policies before filing its lawsuit in the United States and that Mr. Sweeney had called Apple’s plan to comply with Europe’s tech law “hot garbage” and a “horror show.”

“Your colorful criticism of our DMA compliance plan, coupled with Epic’s past practices of intentionally violating contractual provisions with which it disagrees, strongly suggest that Epic Sweden does not plan to follow the rules,” Mr. Schiller wrote.

Mr. Sweeney replied that Epic was “acting in good faith and will comply with all terms of current and future agreements with Apple.”

An attorney representing Apple later wrote Epic Games to tell it that its Sweden subsidiary’s account had been terminated. Mr. Sweeney said that the correspondence was the totality of Epic’s exchange with Apple.