The Massachusetts Republican Party and the political committee of GOP Governor Charlie Baker are feuding over access to lucrative donor databases, an embarrassing intraparty clash that has left both sides locked out of the data by software giant Salesforce.com.

In a scorching letter sent to the company last week, a MassGOP lawyer said the San Francisco company had “unlawfully” blocked the party from its databases since July 15 and “knowingly allowed access by unauthorized third parties,” an apparent reference to Baker’s political team.

The letter, a copy of which was obtained by the Globe, said the lockout had affected fund-raising and demanded that Salesforce restore the party’s access to its databases. It threatened legal action if Salesforce failed to “make a reasonable settlement offer” within 30 days.

The dispute is the latest indication of a rift between the MassGOP and Baker, a moderate Republican whose support for abortion rights, transgender protections, and willingness to raise taxes and fees has frequently put him at odds with the right wing of the party. That includes MassGOP chairman Jim Lyons, a supporter of President Trump and staunch social and fiscal conservative who was elected to the post in January.

Evan Lips, a MassGOP spokesman, confirmed the letter to Salesforce was authentic.

Lyons offered an analogy with an organization he called Non-Profit X.

“They rely on donors who have historically given to an organization. Say there’s a change at the top of the organization and new management walks in the front door and all of the donors and all of the data get taken by the old people walking out — that’s a very valuable asset that Non-Profit X no longer has,” the chairman said. “And that’s pretty much what happened here.”

Salesforce did not respond to e-mails seeking comment.

Baker committee aides said they, too, have been locked out from Salesforce since last month. They said they made an offer through Salesforce to work with the state party to come up with an appropriate division of donor databases, which include years of information. But they said the MassGOP replied, through Salesforce, that the party is not interested in such a division.

For his part, Lyons said, “When someone takes something inappropriately away from someone, why would you want to negotiate with them to begin with?”

In response to questions from the Globe, Jim Conroy, a senior Baker political adviser who helps run the governor’s political committee said, “the Baker Committee has enjoyed working closely with the party for years, sharing resources and information, and hopes to continue to do so.”

The genesis of the dispute is somewhat unclear, and both the Baker Committee and the MassGOP were guarded in what they would tell the Globe. But it appears to coincide with Lyons’s ascension to party chairman in January.

Lyons, a former state representative from Andover known for his advocacy against abortion rights, succeeded Kirsten Hughes, a staunch Baker ally who didn’t vie for another term.

According to the MassGOP letter, written by Arlington lawyer David W. Carr, the state party had paid for a Salesforce subscription since 2015. It suggests that Baker aides tried to take control of that subscription after Lyons was elected.

The letter stated that a Salesforce investigation found an e-mail exchange involving top Baker aides, including Conroy and fund-raising guru John Cook, a week after Lyons was elected.

The exchange was about a $12,273.79 check from the Baker Committee to Salesforce “in payment of an invoice to the MassGOP,” according to the letter.

The letter also said, “The check tendered by ‘The Baker Committee’ was accompanied by a curt explanation that the November, 2018 invoice was ‘paid from the wrong account,’ with a request that Salesforce accept payment from an entity with no relationship to the subscribing MassGOP.”

“The request did not originate from MassGOP,” the letter said.

It added: “Salesforce made no effort to contact its subscriber, MassGOP, to discuss this highly unusual activity.”

State campaign finance records show the Baker Committee paid Salesforce $12,273.79 on Jan. 28. Federal election filings show years of past payments from the MassGOP to Salesforce.com.

While Baker had once endorsed Lyons for his state representative seat, they hold divergent political views and under Lyons’s leadership, the party’s messaging has shifted sharply from Baker’s politically successful focused-on-Massachusetts-allergic-to-Trump rhetoric.

“MassGOP Chairman Lyons: President Trump ‘vindicated,’ ” one press release read.

Baker, who supports abortion rights, signed a law last year that reaffirmed a woman’s right to have a legal abortion. Lyons has been a strong advocate against abortion rights, and in April the state Republican Party denounced a Democratic-led effort to expand abortion access as “infanticide.”

Joshua Miller can be reached at joshua.miller@globe.com.