Apple and Ericsson have sued each other in federal courts after reaching an impasse over mobile patents.

Apple filed its complaint on Monday in the United States District Court for the Northern District of California, in which it said that Ericsson, the telecommunications company, was demanding excessive royalties for patents related to LTE, for Long Term Evolution, which is the latest high-speed wireless technology used for transmitting data between cellular networks and mobile devices.

Ericsson responded with a lawsuit on Wednesday filed in the United States District Court for the Eastern District of Texas. Ericsson said it had failed to reach an agreement with Apple after two years of negotiations, resulting in Apple lacking a license for its technologies. It asked a court to decide whether its offers to Apple were fair, reasonable and nondiscriminatory.

Kristin Huguet, an Apple spokeswoman, said the company had deep respect for intellectual property and it had always been willing to pay a fair price for using so-called standards-essential patents. Essential patents cover basic technologies that companies have to use in their products to comply with industry standards.

“Unfortunately, we have not been able to agree with Ericsson on a fair rate for their patents so, as a last resort, we are asking the courts for help,” Ms. Huguet said in a statement.

Ericsson said its goal was to reach a mutually beneficial resolution with Apple, which had long been a partner. It also noted that every Apple mobile device used Ericsson’s patented technologies and that it wanted reasonable compensation from companies that benefited from technologies it had developed.

“We believe it is reasonable to get fair compensation from companies benefiting from the development we have made over the course of the last 30 years,” Kasim Alfalahi, chief intellectual property officer at Ericsson, said in a statement.

For Apple, a fight over standards-essential patents is nothing new. In 2013, the United States International Trade Commission ordered a ban of older Apple products, after determining that Apple had violated a patent that Samsung owned related to transmission of data over cellular networks. Apple fought the ban, and the decision was ultimately overturned by the Obama administration.