Updated with further terms of the merger agreement

NEW YORK -- Halliburton (HAL) - Get Report reached an agreement to buy rival oilfield services company Baker Hughes (BHI) in a deal valued at $34.6 billion.

Halliburton will pay $78.62 a share for Baker Hughes. Under the agreement, Baker Hughes shareholders will receive 1.12 Halliburton shares and $19 in cash for each share they own.

Baker Hughes shares closed Friday at $59.89 but rose almost 9% in early trading on Monday to $65.16. Halliburton shares fell 8.1%.

The deal is expected to close in the second half of 2015. Baker Hughes shareholders will own about 36% of the combined company once the deal is completed.

The enterprise value of the deal was put at about $38 billion.

The combined company would generate slightly larger revenue than Schlumberger (SLB) - Get Report , currently the world's biggest oil services company, according to The Associated Press.