German chemical maker BASF is set to announce an agreed deal to buy U.S. catalyst firm Engelhard for around $5.1 billion, sources familiar with the situation said on Tuesday.

The two sides are finalising details of the transaction, which has not yet been signed and which could still fall apart, the sources said.

The agreement will end a five-month impasse and head off a likely showdown at Engelhard's annual general meeting scheduled for Friday at which shareholders have a choice of voting for Engelhard's nominees or BASF's.

Last week, BASF raised its offer for Engelhard by $1 to $39 per share, its second increase, but warned it would walk away from the deal if this were not enough to win shareholders over.

BASF first made an offer to buy Engelhard at $37 a share in January. The bid -- and the one at $38 -- was rejected by Engelhard's management as being too low.

If the transaction goes through, it will be BASF's biggest acquisition in its 140-year history and help reduce the cyclical nature of BASF's product palette and mop up some of the cash that BASF's integrated production generates.

One source said the aim was to get the agreement signed in time for Engelhard to announce the deal before markets opened in New York.

It's still subject to the actual signing, the source said.

Earlier, the Wall Street Journal reported in its online edition that Engelhard was close to agreeing a deal.

An Engelhard spokesman could not immediately be reached for comment. A BASF spokesman declined comment.

ANALYSTS UNSURPRISED

Analysts said they had expected an agreed transaction and BASF shares showed little apparent reaction to the report.

BASF shares were down 1.2 percent at 63.79 euros, faring slightly better than the DAX index of bluechip shares.

We already saw the chances as good that the raised offer would be accepted, said Landesbank Rheinland-Pfalz analyst Silke Stegemann in a note.

She added that the acquisition made strategic sense for

BASF.

We see as positive a takeover at less than $40 a share, she said.

Engelhard shares closed at $38.68 on the New York Stock Exchange on Friday, before Monday's Memorial Day holiday.

Analysts say BASF wants to do the Engelhard deal ahead of a likely downturn in profitability at its chemicals unit.

Most analysts expect the chemicals cycle, which is closely linked to profitability in the sector, to peak this year or next.

This year, BASF has bought Degussa's construction chemicals unit for 2.7 billion euros and U.S. resin maker Johnson Polymer for $470 million, apart from some smaller transactions.

(with additional reporting by Kenneth Li in New York)