MAM Software, a publicly traded auto parts- and tires-tracking software-systems company that moved its headquarters from England to Blue Bell in 2017, has agreed to be purchased by Kerridge Commercial Systems of Hungerford, England, for $12.12 a share, totaling $154.2 million.

MAM, which employs about 250, earned nearly $4 million in the last four quarters, on sales of just over $20 million. That’s about the same as the company’s total sales, not counting inflation, when it was spun off as a separate company by UK-based Auto Data Network Inc. in 2008.

The sale price is a record high since the spin-off. MAM over the last three months, traded at an average of $8.80 a share. Company shares closed Tuesday at $12.04, up $1.59 (15.22 percent).

Kerridge, which is also in the auto parts distribution software business, is about five times larger than its target, with more than $100 million in sales. It employs nearly 900, not counting MAM.

MAM chief executive Michael Jamieson, a 28-year veteran of the company and its South Yorkshire, England-based predecessors, in a statement called Kerridge’s offer “a premium price" and said his board unanimously approved it after “an extensive review of strategic alternatives.”

A majority of shareholders have already approved the price in writing, so the companies plan to close the deal before the end of this year.

The companies fit well together, said the buyer, Kerridge CEO Ian Bendelow: “MAM has significant traction in the automotive aftermarket sector” and in the U.S., and Kerridge hopes to expand there. Bendelow pledged to “invest further in the business” and speed MAM operations’ growth as part of Kerridge.

Mirus Capital Advisors and David Danovich of Boston law firm Sullivan & Worcester’s New York office advised seller MAM, while Kirkland & Ellis LP advised Kerridge.