Siemens (SIEGY)   has agreed to buy Mentor Graphics (MENT)  for $4.5 billion in a bid to expand its industrial software portfolio, the company said Monday.

Siemens has offered $37.25 a share in cash for the Wilsonville, Oregon-based group, a 21% premium over Friday's closing price. The acquisition is part of what the company calls 'Siemen's Vision 2020', in which it identified software as a key growth area and extends its Digital Enterprise Software portfolio.

Siemen's shares rose 1.5% to €110 each by 11:30 CET in Frankfurt, just slightly short of the year high of €110.60 hit on Thursday November 10. Mentor shares were up 19.30% in pre-market trading Monday in New York after ending Friday's session up 1.79% at $30.68.

Mentor makes software for designing semiconductors, offering automation software ranging from integrated circuit and system-on-chip design for automotive electronics as companies continue to scramble for a piece of the self-driving car market.

"With Mentor, we're acquiring an established technology leader with a talented employee base that will allow us to supplement our world-class industrial software portfolio. It will complement our strong offering in mechanics and software with design, test and simulation of electrical and electronic systems," said Klaus Helmrich, member of the Managing Board of Siemens.

Mentor's electronics integrated circuits and systems design, simulation and manufacturing solutions are "essential for today's smart connected products such as autonomous vehicles," the company said in a statement.

Activist shareholder Elliott Management has supported the transaction. In late September, Elliott revealed it had upped its stake of Mentor to 8.1%, saying it had initiated dialogue with the board about operational opportunities, including enhancing efficiency and revenue quality, and strategic opportunities for Mentor that would improve shareholder value.

Last week, Siemens announced its intention to spin off its health care business, known as Healthineers. In 2000 it spun off its semiconductor maker Infineon Technoligies AG.

The company expects the Mentor combination to achieve synergies of more than €100 million ($107.56 million) over four years. It is expected to be accretive to earnings per share in three years from closing.

The deal is subject to approvals and is expected to close in the second quarter of 2017.

"By adding Mentor's electronic design automation solutions and talented experts to our team, we're greatly enhancing our core competencies for product design that creates a very precise digital twin of any smart product and production line," Helmrich said.